You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
# vim: set ff=unix tabstop=4 shiftwidth=0 softtabstop=-1 noexpandtab fileencoding=utf-8 fileformat=unix filetype=zsh : # https://gist.github.com/kotashiratsuka/8b345e37fac98b71cbd6464c027bfe2c #coredumpãã¡ã¤ã«ãä½ãããªãããã«ãã ulimit -c 0 #æ¥æ¬èªã使ã export LANG="ja_JP.UTF-8" if [ ! -f ~/.zshrc.zwc -o ~/.zshrc -nt ~/.zshrc.zwc ]; then zcompile ~/.zshrc fi # vim: set ff=unix tabstop=4 shiftwidth=0 softtabstop=-
ã·ã§ã«ã®ä¸ãã exec zsh ããããã GNU screen ã tmux ãçµç±ãã¦éæ¥çã«ã·ã§ã«ã®ä¸ã§ã·ã§ã«ãéãããããã¨ãã« ä½ãèããã« PATH ã追å ãã¦ãã㨠ã©ãã©ãé·ããªã£ã¦ãã£ã¦ãã¾ãã¨æãã¾ãã bash ãªã©ã§ã使ããããã«æ±ç¨çã«ãããã¨ããã¨èªåã§é å¼µããªãã¨ãããªãã®ã§ããã zsh ã§ã¯ zsh èªä½ã®æ©è½ã§ç°¡åã«éè¤ãé²ãã¾ãã ã¾ãããã¹ã«æã¾ãããªããã®ãå ¥ã£ã¦ããæã«åé¤ããæ¹æ³ãç´¹ä»ãã¾ãã ãã®æ稿㯠zsh Advent Calendar 2013 ã®12æ¥ç®ã®è¨äºã§ãã éè¤åé¤ éè¤ãåé¤ããã«ã¯
ç¹ã«ãcd ã bindkey ãªã©ãä»åãã¦ããã·ã§ã«ä¸ã§å¯ä½ç¨ã®ããå¦çãè¡ãããã¨ã㯠source ã使ããªãã¨ãã¾ããããªãã ããã ä¸æ¹ãsource ã«ã¯ãããªãã¡ãªãããããã .zshrc ã§ãã£ã±ã source ããã¨zsh ã®èµ·åãé ããªã ç¾å¨åãã¦ããã·ã§ã«ã® alias è¨å®ã®å½±é¿ãåãã ç¹ã«2ã¤ããåä»ã ãä¾ãã° grep ã¨ãããã¨ãã«ãalias grep='grep -E' ãªããè¨å®ãã¦ãã£ããæ£è¦è¡¨ç¾ã®æå³ãå¤ãã£ã¦ãã¾ããä¸å¿ command grep ã¨ããã° alias ãè¨å®ãã¦ããªãå ã® grep ãå®è¡ã§ãããã©ããã¡ãã¡ããæ¸ãã®ãæéã ã ãããªã¨ã㯠autoload ã使ãå½¢ã«æ¸ãæããã¨ãã¾ãããã autoload ã¨ããã®ã¯ãé¢æ°æ¬ä½ã®èªã¿è¾¼ã¿ãå®è¡ããæã¾ã§é ããããã¨ãã zsh ã®æ©è½ã®ãã¨ããã㧠~/.zshr
ã¨ãã£ã¿ã¯vimã使ã£ã¦ãã¾ã æ®æ®µã®ã³ã¼ãã£ã³ã°ä½æ¥ã§ã¯ã¨ãã£ã¿ã¯vimã使ã£ã¦ãã¾ããEclipseãªã©ã®IDEã¯ä½¿ã£ã¦ãã¾ãããã¡ã¤ã³ã®éçºãPHPãPerlã¨ããã®ãããã®ã§ãããIDEã«ãã ããããã¯ã軽éã«ã¿ã¼ããã«ä¸ã§ãã¤ã§ãã©ãã§ãä¿®æ£ã§ãããã¨ãéè¦ãã¦ãã¾ãããã®åã.vimrcã¯ã¡ãã£ã¨ã«ã¹ã¿ãã¤ãºãã¦ãã¾ãã.vimrcã¯GitHubã®dotfailesãå©ç¨ããæ¹æ³ãããã¾ããç§ã¯è²ã ãªãµã¤ããåèã«ã«ã¹ã¿ãã¤ãºãã¾ãããç§ã®è¨å®ãå ¬éãããã¾ãã vimã®è¨å® ã¾ãã¯NeoBundleãã©ã°ã¤ã³ããã¦ã³ãã¼ããã¾ãã $ git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim 次ã«.vimrcã以ä¸ã®ããã«ä½æãã¾ããã " vi äºæã§ã¯ãªãVim ã®ããã©ã«ã
man ã³ãã³ãã§è¡¨ç¤ºããããã¥ã¢ã«ãã¼ã¸ã«è²ä»ããã man ã³ãã³ããman ã³ãã³ãããã³ã³ãã³ã⦠é£å¼ãã¦ããç§ã¯ããä»å¹´ã§31æ³ã§ããããã°ããã ~/.zshrc [bash 使ããªã ~/.bash_profile ] ã«ä»¥ä¸ã追è¨ããã¨man ã«è²ãã¤ãã¦èªã¿ãããã£ãã man() { env \ LESS_TERMCAP_mb=$(printf "\e[1;31m") \ LESS_TERMCAP_md=$(printf "\e[1;31m") \ LESS_TERMCAP_me=$(printf "\e[0m") \ LESS_TERMCAP_se=$(printf "\e[0m") \ LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ LESS_TERMCAP_ue=$(printf "\e[0m") \ LESS_TERMCAP
ããã§è¨ãhistoryã¨ã¯ï½¤ã³ãã³ãå±¥æ´ã®ãã¨ã§ã。ã·ã§ã«ã¯ãã¡ããzshã§ã。ãã®æ稿ãèªãã§ããã¦ãã人ã¯ï½¤å¤åzshã使ã£ã¦ããã¨æãã¾ãã、ã¾ã å ¥ãã¦ãªãã¨ãã人ã¯ä»¥ä¸ã®æ§ãªæé ãè¸ãã¨ï½¤zshãã¤ã³ã¹ãã¼ã«ãããã¨ãã§ãã¾ã。 zshã®ã¤ã³ã¹ãã¼ã« Windowsã¦ã¼ã¶ã¼ã®å ´å Cygwinã¨ãããã®ã使ãã¾ã。ã¾ã、Ctrl+Rãæ¼ãã¦ï½¤powershellã¨å ¥åã、Enterãæ¼ãã¾ããã。ããã¦ï½¤ä»¥ä¸ã®ã¹ã¯ãªãããå®è¡ãã¾ã。ã¾ãã¯ï½¤ãã¡ããããã¦ã³ãã¼ããã¦ï½¤å®è¡ãã¡ã¤ã«ãããã«ã¯ãªãã¯ããã®ãããããããã¾ãã。ãã®éã¯ï½¤Wgetã ãã«ã¯ãã§ãã¯ãå ¥ãã¦ããã¾ããã。 function Install-Cygwin { param ( $TempCygDir="$env:temp\cygInstall" ) if(!(Test-Path -Path $TempCygD
ã¨ããæ¹ã® "ã¨ã³ã¿ã¼ã ã㧠ls 㨠git status 表示ããããã«ãã¦ãã" ã¨ããã¤ã¶ãããè¦ã¦ä¾¿å©ããã ã¨æã£ãã®ã§ãã£ã¦ã¿ã¾ããã åºæ¬çãªããæ¹ã¯ä»¥ä¸ã®è¨äºãåèã«ãªãã¾ããã zshã§ã³ãã³ãã空ã®ç¶æ ã§enteræ¼ããã¨ãã«ä»»æã®ã³ãã³ããå®è¡ããæ¹æ³ - kei_q ãã ãä¸è¨æ¹æ³ã§ã¯ç§ã®ç°å¢ã®å ´åãããã³ããã1åä½åã«è¡¨ç¤ºããã¦ãã¾ã£ã¦æ°æã¡ãæªãã®ã§ããã®è¾ºããæãå ãã¾ããã Installation 以ä¸ã¹ã¯ãªããã .zshrc ã«è¨è¿°ããã°ãä½ãå ¥åããã¦ããªãç¶æ 㧠Enter ãæã¤ã ã㧠ls 㨠git status ã表示ãããããã«ãªãã¾ãã function do_enter() { if [ -n "$BUFFER" ]; then zle accept-line return 0 fi echo ls # âãããã # ls_abb
zshã§ã®gitã³ãã³ãã®å ¥åè£å®ãè¨å®ããæ¹æ³ã¯ããã¤ãããããã§ãããæè¿ã¯gitã®ã½ã¼ã¹ããªã¼ã«contrib/completion/git-completion.zshã¨ãããã®ãå«ã¾ãã¦ããã®ã§ãä»åã¯ãããå©ç¨ããæé ãç´¹ä»ãã¾ãã è¨å®ãè¡ãã¨ã以ä¸ã®ããã«ã³ãã³ãããªã¢ã¼ããªãã¸ããªããã©ã³ãåã®è£å®ãã§ããããã«ãªãã¾ãã ä»åãåä½ã確èªããç°å¢ã¯ä»¥ä¸ã®éãã§ãã Mac OS X 10.8.3 zsh 5.0.2 git 1.8.2.3 zshã¨gitãHomebrewã§ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åã¯ãzshã®è¨å®ãè¡ãã ãã§ä½æ¥å®äºã§ããgit 1.8.2.2ã«å«ã¾ããè£å®å®ç¾©ãã¡ã¤ã«ã¨git 1.8.2.3ã«å«ã¾ããããã¨ã§ã¯çµæ§éãããããããªã®ã§ï¼ã³ããããã°ï¼ãgitã¯ã§ããã ãææ°çã«ã¢ãããã¼ããã¦ããã¾ãããã Homebrewã使ã£ã¦ããªãå ´åã¯ãè£å®å®
GitHub ⤠~/ Why would I want my dotfiles on GitHub? Backup, restore, and sync the prefs and settings for your toolbox. Your dotfiles might be the most important files on your machine. Learn from the community. Discover new tools for your toolbox and new tricks for the ones you already use. Share what youâve learned with the rest of us. Navigating this site If youâre just starting out, before you g
zsh 㧠Git 使ã£ã¦ã人ã¯ããã³ããã«ãã©ã³ãåã¨ãã表示ãã¦ã人ãå¤ãã¨æãã zsh ã«æ¨æºã§å ¥ã£ã¦ã vcs_info ã£ã¦ããã®ã使ãã¨ã ãããããæãã«ã§ãããã ãã©ãã§ããªããã¨ãå½ç¶ããã ä¾ãã° stash ããæ°ã®è¡¨ç¤ºã«ã¯å¯¾å¿ãã¦ããªãã®ã§ãèªåã§ç¡çç¢çãªæã㧠Git ã³ãã³ããå¼ã³åºãã¦ããã³ããã«è¡¨ç¤ºãã¦ã人ãããã¨æãã ã§ã zsh 4.3.11 ããããã vcs_info ã« Hooks ã¨ããã®ã追å ããã¦ãå ã®æ©è½ã«èªåã§å¦çã追å ã§ããããã«ãªã£ã¦ããããã使ãã¨å¥½ããªããã«ã«ã¹ã¿ãã¤ãºã§ããããã«ãªãã®ã§ç´¹ä»ããã ãã®è¨äºã§ã§ããããã«ãªãã㨠ãããªãã¨ãããã³ããã«è¡¨ç¤ºã§ããããã«ãªãã 使ç¨ãã¦ãããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã®åå(svn, git, hg, ...) ç¾å¨ã®ãã©ã³ãå ãã¼ã¸å¤±æã®ã¨ã©ã¼è¡¨ç¤º ããã« Git ã®å ´åã¯ä»¥ä¸
ã¾ã, ä»ã®ã·ã§ã«ãã使ãã®äººã«ã¯ããããªãã. aliasã³ãã³ãã®-sã使ããã®ã¯ zsh 4.2.x- ã§, ä»ã®ã·ã§ã«ã§ã¯å®è£ ããã¦ããªãã¨æãã¾ã. ãã¨, ããæ¢ã« alias -s ç¥ã£ã¦ããã¼ã£ã¦äººã¯èªã¾ãªãã¦ããã§ã. alias -s ã£ã¦ä½ï¼ æã£ãã³ãã³ãã®å¾ã(suffix)ãè¦ã¦, é©å½ã«å®ãããã£ã¦ããããã¤ã§ã. 次ã®ä¾ãè¦ã¦ä¸ãã. ~$ echo "print ('hello, world')" > hello.py ~$ python hello.py hello, world ~$ alias -s py=python py=python ~$ ./hello.py hello, world ~$ Pythonã®ã³ã¼ã㯠python hello.py ã§å®è¡åºæ¥ã¾ãã, ãå°»ã py ãªã python ã使ãã¾ã, ã¨aliasãã¦ããã°, ./
以ä¸ã¯ç§ã® .zshrc ãã z.sh ã®åä½ã«å¿ è¦ãªé¨åãæç²ãããã®ã§ããå¤ããã¼ã¸ã§ã³ã® zsh ã§ãåä½ããããããç´æ¥ã¹ã¯ãªããã®åä½ã«é¢ããã®ç¡ãé¨åãè¨è¼ãã¦ãã¾ãã ã¹ã¯ãªãã㯠$ZDOTDIR/z/z.sh ã«é ç½® z ã ã¨ã¿ã¤ããã¥ããã®ã§ j ã«å¤æ´ è¨é²ãã¡ã¤ã«ã¯ $ZDOTDIR/.z ã«å¤æ´ :a ã :A ãªã©ã®å¤æ°å±éå¶å¾¡ç·¨éåã使ç¨ã§ããªããã¼ã¸ã§ã³ã§ã¯ç¬èªã«ããã¯é¢æ°ãå®ç¾© autoload -Uz is-at-least # Treat hook functions as array typeset -ga chpwd_functions typeset -ga precmd_functions typeset -ga preexec_functions # Simulate hook functions for older versions if
ä¸è¬ç㪠Web Programmer ãªãã°ãHTTP Status code ã¯ãã¹ã¦æè¨ãã¦ããã¨èãã¾ããã ããããåã¯åå¿è ãªã®ã§ããªããªãè¦ãããã¦ããªãã®ã§ãHTTPã®ã¹ãã¼ã¿ã¹ã³ã¼ãããããã®ã«ä¾¿å©ãªãã¼ã«ãç¨æãã¾ããã _httpstatus ã§ããã¤ã³ã¹ãã¼ã«æ¹æ³ã¯ _httpstatus ãfpathã®éã£ãã¨ããã«ç½®ãzshãåèµ·åããã ãã§ãã (注æï¼httpstatusã³ãã³ãæ¬ä½ã¯å«ã¾ãã¦ããã¾ãã) yonchu/_httpstatus.zsh - gist $ cp _httpstatus /usr/local/share/zsh/site-functions $ exec zsh 700çªä»¥éã¯â¦ä¾ã®ã¢ã¬ã§ãã ä»æ¥ã®åèæç®: httpstatus ã³ãã³ãã§ãHTTP ã®ã¹ãã¼ã¿ã¹ã³ã¼ãããã°ããããã¹ã! - tokuhirom's blog
ãè³¢ãcdãâzâã®ä¿ºçforkãknu-zãv2.0ããªãªã¼ã¹ãã¾ããï¼è±èªçè¨äºï¼ã ãªãªã¸ãã«çãããã£ã¦ãããã¡ã«ä¿®æ£ç®æãããããè¦ã¤ãããç´ãããã¦åå¥ã«pull requestãããã¨ãå°é£ã«ãªããéä¸ã§ä½è ã®rupaããã«ã¯forkã®åå¨ã¨ãããã詳細ãªå¤æ´ç¹ãªã¹ããã¡ã¼ã«ãããã ãã©æãã§ã«é ããã»ãã«ãforkãããããããããã¦ããããã ã£ããããã¨ã¯ããbashã®è£å®ã¯å£ãã¦ãããzshã®è£å®ãå¤ãã¦ï¼compsysï¼ãã¾ãã¡ã ããã¨ããããã§ãã£ã¼ãããã¯ã«ã¤ãã¦ã¯æ°ã«ããã«ã³ã¢ã®ã¢ã«ã´ãªãºã é¨ä»¥å¤ãå¤§å¹ ã«æ¸ãç´ãã¾ããã ã¤ãã§ã«cdã®è£å®åè£ã«zã®ã¹ã¿ãã¯ï¼ãã£ã¬ã¯ããªç§»åå±¥æ´ã«åºã¥ãã¦ã¹ã³ã¢ãªã³ã°ããããã£ã¬ã¯ããªãªã¹ãï¼ãå«ããããã«ããã®ã§ããzã使ãããã¹ãã§ã ãzã使ããã¨ãããé常ã®ç§»åã¯cd1ãããè¡ãã¨ããã¸ã®ç§»åã¯zããªãã¦ããæ²ãã使ãåã
åæã«èµ·åã«800msãããããã£ã¦ã¡ãã£ã¨éãæãããã©ãç«ã¡ä¸ãã£ã¦ãã¾ãã°å¼·åãªã®ã§ããæãã«ãªã£ã¦ãããtime (source ~/.zshrc ) ã¨ãã§ãããã¡ã¤ãªã³ã°ã§ããã£ã½ããã©ããã¾ã¯ã¾ã ãã£ã¦ãªããã¡ã¢ã ããã³ããã®ãã¤ã©ã¤ã ã¨ããããã©ãã©ãè²ãã¤ãã°ããã¨æãã®ã§ãããã zsh-users/zsh-syntax-highlighting · GitHub å°å ¥ã¯å¾è¿°ãã antigen ã«ã¾ããããã¨ã«ãããè²ãé©åã£ã¦ã®ã¯ããããããã£ã¦æå³ã大ãããã©ãåç´ã«æ¥½ããã§ããã MySQL ã®ããã³ããã®ãã¤ã©ã¤ã æ£ç¢ºã«ã¯ããã³ããã®ä¸é¨ã«ã¦ã¼ã¶ã¼ã DB æ å ±ãæ¥ç¶ãã¹ãããã¤ã©ã¤ãããã¦ããã¾ã©ã® DB ã触ã£ã¦ãã®ããããããããã¦ããã MySQLã®CLIã®ããã³ãããã«ã¹ã¿ãã¤ãºããzshã®functionãæ¸ãã - ã¦ã¤ããã«ã£ã tets
ä»ã¾ã§ã¯ãã«ã®ä¸ã¤è¦ãã®ããã«ä½ã§ãããã§ã$HOME/.zshrcã«æ¸ãã¦ãããã©ããµã¼ã管çãããããããã«ãªã£ã¦ãã¦ãè¤æ°ã¢ã«ã¦ã³ãã®å ±éè¨å®ã¨ããããããªã£ãã®ã§èª¿ã¹ãã é çª ä»¥ä¸ã®$ZDOTDIRã¯æå®ããã¦ããªãå ´å$HOMEã«ãªãã ãã°ã¤ã³æ /etc/zshenv $ZDOTDIR/.zshenv /etc/zprofile $ZDOTDIR/.zprofile $ZDOTDIR/.zshrc /etc/zlogin $ZDOTDIR/.zlogin ãã°ã¢ã¦ãæ $ZDOTDIR/.zlogout /etc/zlogout è¨ãã¾ã§ããªããå人çãªè¨å®ã¯$ZDOTDIRã«ãæ±ç¨çãªè¨å®ã¯/etcã«æ¸ãã å種説æ zshenv å¿ ãå®è¡ãããã/etc/zshenvã¯ä¸æ¸ãä¸å¯ã§$PATHã$MANPATHã®è¨å®ããããã $ZDOTDIR/.zshenvã«ã¯ãããªã
autoload -U compinit compinit zstyle ':completion:*:default' menu select=2 # è£å®é¢æ°ã®è¡¨ç¤ºãå¼·åãã zstyle ':completion:*' verbose yes zstyle ':completion:*' completer _expand _complete _match _prefix _approximate _list _history zstyle ':completion:*:messages' format '%F{YELLOW}%d'$DEFAULT zstyle ':completion:*:warnings' format '%F{RED}No matches for:''%F{YELLOW} %d'$DEFAULT zstyle ':completion:*:descriptio
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}