When using the latest ZSH and RVM on Mac OS X 10.7.4 ZSH complains about this: __rvm_cleanse_variables: function definition file not found
ãã¯ããã«ã MSYS2ã§mintty+zshãªã·ã§ã«ç°å¢ãæ§ç¯ããçºã®æé ãã¾ã¨ãã¦ããã¾ãã 以åã®è¨äº ã¨éè¤ã«ãªãé¨åãå¤ã ããã¾ãã®ã§ãæ¢ã«MSYS2ãå°å ¥ããã¦ããæ¹ã¯é©å½ã«èªã¿é£ã°ãã¦ãã ããã ##ãMSYS2ã®ã¤ã³ã¹ãã¼ã«ã ã¾ã㯠http://sourceforge.net/projects/msys2/files/Base/ ãããææ°ã®MSYS2ããã¦ã³ãã¼ããã¾ãã ãã¡ã¤ã«ã¯64bitç/32bitçãã¤ã³ã¹ãã¼ã©å½¢å¼/ã¢ã¼ã«ã¤ãå½¢å¼ã ããããããã¾ãã®ã§èªåã®ç°å¢ã«åã£ããã®ãã好ã¿ã§é¸æãããã ããã 次ã«ããã¦ã³ãã¼ããããã¡ã¤ã«ãé©å½ãªãã£ã¬ã¯ããªã«ã¤ã³ã¹ãã¼ã«ï¼åã¯å±éï¼ãã¾ãã ã¤ã³ã¹ãã¼ã«ãããã£ã¬ã¯ããªã¨ãã¦ã¯ ãã¹åã«ASCIIæå以å¤ä½¿ç¨ããªã ãã¹åã«ã¹ãã¼ã¹ã使ç¨ããªã ã®å¶éãããã¾ããã¾ãæ大ãã¹é·ã®å¶éããããããªã®ã§ãåºæ¥ãã
ãªãã shell function ã ã® alias ã ã®ã¯ããããããããããªããªã¼ã¨æã£ãæã«æ¢ã«é©ç¨ãã¦ãã¾ã£ã shell ã«å¯¾ã㦠unfunction ã ã® unalias ã ã®ãããããããã¨ã zsh ãåèµ·åããªããã°ãªããªããã¨ãã£ããããªçç±ã§ãã¾ã好ãã§ã¯ãªãã§ããã§ãåºæ¬çã« ~/bin ã®ä¸ã«ã©ãã©ãã¤ã£ãã¿ã¾ãã ãã®ã¹ã¿ã¤ã«ã§ãã£ã¦ã¦åé¡ã«ãªãã®ã¯æ°ããå®è¡ãã¡ã¤ã«ãçªã£è¾¼ãã æã«å¿ è¦ã«ãªã rehash ã¨ãããã³ãã³ãã§ãã bash ã¨ãã¯åæã«èª¿ã¹ã¦ãããã®ã«â¦! ã¨ãæãã¾ããã NFS ã¨ãããããç°å¢ã§ã¯åãã£ã¦èª¿ã¹ã¦ããã¦ããã¦ããã®ã¯æªããã¨ã§ã¯ãªãã®ã§æããªããã¨ã«ãã¾ãã ã§ãã¾ã rehash ã¨ãã¿ã¤ãããã®ã¯é¢åã ãªãã¨èãã¦ãã¦ã ^L ã§ç»é¢ãæ¶å»ããæã«åæã« rehash ãã¦ãããããããä¸åº¦ããç²åº¦ãããªãããªãã¨æ
alias -s txt='cat' alias -s html='google-chrome' alias -s rb='ruby' alias -s py='python' alias -s hs='runhaskell' alias -s php='php -f' alias -s {gz,tar,zip,rar,7z}='unarchive' # preztoã®archiveã¢ã¸ã¥ã¼ã«ã®ã³ãã³ã(https://github.com/sorin-ionescu/prezto/tree/master/modules) alias -s {gif,jpg,jpeg,png,bmp}='display' function runcpp () { g++ -O2 $1 shift ./a.out $@ } alias -s {c,cpp}='runcpp' function runjava
# 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=-
$ _z <TAB> /to/path/hoge /to/path/fuga /to/path/piyo /to/path/foo /to/path/bazz /to/path/bar ãããããã©ã«ãã§ã¯_zã«ããè£å®é¢æ°ãè¨å®ããã¦ãã¾ããã ããã§.zshrcã«ä»¥ä¸ã®ãããªè¨å®ã追å ãããã¨ã§_z以å¤ã«ãè£å®é¢æ°ãé©ç¨ãããã¨ãã§ãã¾ãã
åãã« zshæå¼·ã·ã§ã«å ¥éãè²·ã£ã¦ãããzshã®ã«ã¹ã¿ãã¤ãºã«ã¯ã¾ã£ã¦ãã¾ããä»æ¥ã¯ã³ãã³ãã©ã¤ã³ç·¨éã®ãã¼ãã¤ã³ããããæãã«ãããã¨ãã¦ãã¾ããã ã§ãè²ã ãã£ã¦ããã©ããã¼ããããã足ãã¾ããã ä½ã使ãããããã¼ã«å²ãå½ã¦ããã¨ãã¦ããããã¦ãã®ãã¼ã¯ããã©ã«ãã§ä½¿ããã¦ãã¾ããããã§ããä½ã«ãå²ãå½ã¦ããªãããæ¼ãããããã¼ã(ããå)ã¨ãæ¼ããããããã«ã»ã¨ãã©ä½¿ã£ã¦ããªããã¼ã(ãããå)ãæ¢ããã¨ã«ãã¾ããã ããã©ã«ãè¨å®ã調ã¹ã 使ãããããã¼ãã¤ã³ãã¨è¨ãã°ããCtrl+ãªãã¡ããããã¨ãããã¨ã§ãããã©ã«ãã®ãã¼ãã¤ã³ãã®ãã¡C-*ã¨ããå½¢å¼ã®ãã¤ã調ã¹ã¾ããã % bindkey -d # ããã©ã«ãè¨å®ã«æ»ã % bindkey -e # emacsã¢ã¼ãã使ã % bindkey # ä»è¨å®ããã¦ãããã¹ã¦ã®ãã¼ãã¤ã³ãã表示ãã "^@" set-mark
ä»å㯠grunt ã³ãã³ãã®è£å®é¢æ°ãä¾ã¨ã㦠ãã£ãã·ã¥æ©è½(cache-policy) ã«ã¤ãã¦è§£èª¬ãã¦ããã¾ãã grunt ã«ã¤ãã¦ã¯ç¥ããªãã¦ã大ä¸å¤«ã ã¨æãã¾ãã ãã£ãã·ã¥æ©è½(cache-policy) ã«ã¤ãã¦ã®è§£èª¬ãã¡ã¤ã³ãªã®ã§ãzsh è£å®é¢æ°ã®åºæ¬çãªèª¬æã¯çç¥ãã¾ãã ãã®ä»£ãããã³ã¼ãå ã«ã³ã¡ã³ãã§ç°¡åãªèª¬æãæ¸ãã¾ããã®ã§ãã¡ããåèã«ãã¦ä¸ããã â» ã¨ã¦ãé·ãè¨äºãªã®ã§ã誤åè±åãããããããã¾ãããã容赦ä¸ãããm(_ _)m (è¦ã¤ãããæãã¦ãããã¨å©ããã¾ã) ã¯ããã« grunt ã«ã¯æ¨æºã§ bash ã®è£å®ãã¤ãã¦ãã¾ãã ããããzsh ç¨ã®è£å®é¢æ°ã¯ç¡ããbash ã®è£å®ã¨åãæ¹æ³ã§å®è£ ããã®ã§ã¯ãªãã·ã§ã³ãã¿ã¹ã¯ã®èª¬æã表示ããã¾ããã ãªãã·ã§ã³ã®èª¬æã¯ãã¿æ¸ãã§ããã¨ãã¦ããã¿ã¹ã¯ã®èª¬æã¯ããã¯ããã¾ããã ã¨ãããã¨ã§ä½æããã®ã
ã¨ããæ¹ã® "ã¨ã³ã¿ã¼ã ã㧠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
bashã®è£å®ã¯å ¬å¼ã§æä¾ããã¦ããããgruntã®zshè£å®ããªãã£ãã®ã§ä½ã£ãã ç§ãåå¨ãç¥ããªãã ããããããªãã®ã§ãç¥ã£ã¦ãæ¹ããããæãã¦ãã ããã (zsh-completions 㨠oh-my-zsh ã«ã¯ãªãã£ãã1ã¤ã ãgithubã«ãã£ããã©å¾®å¦ã ã£ãã) ã¡ãªã¿ã«å ¬å¼ã®bashè£å®ã¯ã以ä¸ã®è¨å®ã .bashrc ãªã©ã«è¨è¿°ããã°ä½¿ç¨åºæ¥ã¾ãã eval "$(grunt --completion=bash)" zshè£å®ã¤ã¡ã¼ã¸ ã¤ã³ã¹ãã¼ã«æ¹æ³ Githubã«ç½®ãã¦ããã®ã§ã¨ã£ã¦ãã¦ä¸ããã yonchu/grunt-zsh-completion · GitHub $ git clone git://github.com/yonchu/grunt-zsh-completion.git or $ wget https://github.com/yonchu/gr
ã¿ã¼ããã«ã®ããã³ãããå¤ãã¾ããã ä»ã¾ã§ã¯ãããªæãã§ããã£ã¬ã¯ããªãæ·±ããªã£ã¦ããã¨ã³ãã³ãã®éä¸ã§æ¹è¡ããã¦æ²ããæãã§ãã ä¸ã®ç»åã¯pwdã³ãã³ããå®è¡ããæã§ãã æ²ããã§ããã ã¡ãªã¿ã«ããã¯oh-my-zshã®"agnoster.zsh-theme"ã¨ãããã¼ãããã§ãããªã ãããã£ããã®ã§ãã æçµè¡ã® PROMPT='%{%f%b%k%}$(build_prompt) ' ã®æã PROMPT='%{%f%b%k%}$(build_prompt) $SEGMENT_SEPARATOR ' ã¨ããæãã«å¤æ´ãã¦ãã¾ãã ãã¨è²ãã¡ãã£ã¨å¼ã£ã¦ãã¾ãããããã¯å²æã ã¡ãªã¿ã«"avit.zsh-theme"ã¨ãããã¼ãã®è¡¨ç¤ºãããæãã ã£ãã®ã§ããããçä¼¼ãã¾ããã ããã¨ã以åå人ã«ã¿ã¼ããã«ç°å¢ãç´¹ä»ããã®ã§ããããã®ãã©ãã¼ãåºæ¥ã¦ããªãã£ãã®ã§ãã¡ããã¨é åºç«ã¦ã¦
zsh ã®ããã³ããã«è²ãã¤ãã¦ã¿ãã ããããªãµã¤ããåèã«ããçµæã次ã®è¨å®ã¨ãªã£ãã #local LEFTC=$'%{\e[1;32m%}' #ã¿ã¼ããã«.app ç¨ #local RIGHTC=$'%{\e[1;34m%}' #ã¿ã¼ããã«.app ç¨ local LEFTC=$'%{\e[38;5;30m%}' local RIGHTC=$'%{\e[38;5;88m%}' local DEFAULTC=$'%{\e[m%}' export PROMPT=$LEFTC"%U$USER%%%u "$DEFAULTC export RPROMPT=$RIGHTC"[%~]"$DEFAULTC ããã³ããæååã®åå¾ã® LEFTC, RIGHTC, DEFAULTC 㧠è²ãã³ã³ããã¼ã«ãã¦ããã iTerm.app ã§ã¯ã«ã©ãã«è¡¨ç¤ºãå¯è½ã ãã ããã©ã«ãã®ã¿ã¼ããã«.app 㯠8
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}