% vi ~/.zshrc export MAILCHECK=0 % source ~/.zshrc ã¨è¨å®ããã
% vi ~/.zshrc export MAILCHECK=0 % source ~/.zshrc ã¨è¨å®ããã
âGit ã ãã㨠Mercurial ã ããã¨ããã©ã³ãåãzshã®ããã³ããã«ã¹ãã¼ãã«è¡¨ç¤ºããæ¹æ³â ã§ç´¹ä»ããã¦ãã zsh ã® vcs_info ã¨ããé¢æ°ã使ã£ã¦ git ã mercurial ã®ãã©ã³ãåãããã³ããã«è¡¨ç¤ºãã¦ããã¿ããã§ãã git 使ã£ã¦ããå®éã©ã®ãã©ã³ãããã£ã¦ãã®ãããããªããªããã¨ã å¤ã ãã£ã¦å°ã£ã¦ãã®ã§ãã£ããå°å ¥ãã¦ã¿ã¾ããã ã¯ã¾ã£ãã®ã¯ âvcs_info: function definition file not foundâ ã¨ããã¨ã©ã¼ã 表示ãã vcs_info ã使ç¨ã§ããªãã£ãã ããã¯ãã¼ã¸ã§ã³ã 4.3.6-dev-0+20080929-1 以éã«ããã°ãããããã mac ã® ports ã®å ´å㯠zsh-devel ã§ãããªã㨠4.3.6 以ä¸ãªã®ã§ä½¿ç¨ã§ããªãã zsh-devel ãã¤ã³ã¹ãã¼ã«ã㦠/opt
Update æ¹è¯ãã¾ããâ git ã®ãã©ã³ãå *ã¨ä½æ¥ç¶æ * ã zsh ã®å³ããã³ããã«è¡¨ç¤ºï¼ status ã«å¿ãã¦è²ãã¤ãã¦ã¿ã - ã¤ã«ãããã¤ãºãã ã£ã 以ä¸å¤ãæ å ± ãããªããªãã¾ãã ä½æ¥ãã£ã¬ã¯ããªãã¯ãªã¼ã³ãªãç· è¿½è·¡ããã¦ããªããã¡ã¤ã«ãããã¨ãã¯é»è² 追跡ããã¦ãããã¡ã¤ã«ã«å¤æ´ãããã¨ãã¯èµ¤ å¤æ´ããï¼æªè¿½è·¡ãã¡ã¤ã«ããã§å¤ªåã®èµ¤ ãããªæãã§ã ã³ã¼ã # ${fg[...]} ã $reset_color ããã¼ã autoload -U colors; colors function rprompt-git-current-branch { local name st color if [[ "$PWD" =~ '/\.git(/.*)?$' ]]; then return fi name=$(basename "`git symbolic-ref HE
2012/12/13 è¿½è¨ zsh 4.3.11 以éã®æ°ããæ©è½ã使ã£ã¦æ¹è¯ãã¾ããã -> ãzsh ã® vcs_info ã«ç¬èªã®å¦çã追å ã㦠stash æ°ã¨ã push ãã¦ããªã件æ°ã¨ãä½ã§ã表示ãã - Qiitaã æè¿Gitã使ãå§ãããã§ããã©ã³ãã¨ã使ãããã«ãªã£ã¦ãä»ã©ã®ãã©ã³ãã«ããã®ããzshã®ããã³ããã«è¡¨ç¤ºããããªã£ã¦ãããããããããããªããã°ã®ã¨ã³ããªãããè¦ããããªãã¨æã£ã¦ã¡ãã£ã¨èª¿ã¹ã¦ã¿ãã gitã³ãã³ããå¼ã³åºãã¦ãªãããã£ã¦ãä¾ãå¤ããã©ãmanãèªãã§ããzshèªä½ã«ããããã®ãçµã¿è¾¼ã¾ãã¦ãã®ã§ç´¹ä»ãvcs_info ã£ã¦ã®ã使ãã¨è§£æ±ºããã zshrcã®ä¾ ãããªãã ãã© zshrc ã®æ¸ãæ¹ã®ä¾ã autoload -Uz vcs_info zstyle ':vcs_info:*' formats '(%s)-[%b]' zstyl
zshã使ãå§ãã¦æåã«æ°ã«ãªãç¹ã®ãã¡ãããã«è¨å®ãã¦ããã«å¹æãå®æã§ããå³å¹è¬çãªãã®ãä»åã¯ç´¹ä»ãããã ããã³ãã ããã¾ã§ã¨ã¯éãã·ã§ã«ãèµ·åãã¦ã¾ãç®ã«ããã®ãããã³ããã§ããããå¤ããã¨ã¡ãã£ã¨ããéåæãããããã®éåæã¯çµæ§å¤§åã§ã¹ã¼ãã¼ã¦ã¼ã¶ã«åãæ¿ãããããã¾ãè¨å®ãã¦ããªããã·ã³ã触ã£ã¦ãããã¨ãããã¨ãå®æã§ããã®ã§æ éã«ä½æ¥ãé²ãããã£ããã«å©ç¨ã§ããã zshã«ä¹ãæããã¨ããããããéåæãæããããã¾ã§ã®ã·ã§ã«ã¨ä¼¼ããã®ã«ããããªããããããªãããã¡ãã£ã¨ããéåæãä¿ã£ã¦ããã¾ã§ã¨ã¯éãæ©è½ãããããå©ç¨ããã®ã ãã¨ããå¿æ§ãã«ãããã©ãã ããããå¿æ§ãã¯ã¨ãããã¨ãã¦ãããã³ããåºåã«ãzshã®ç´°ãããªé æ ®ãããã®ã§ããããæ´»ãããªãã®ã¯æã§ããã ãã®æ©è½ããã«ã«æ´»ããã¦ãããã¨ã¾ã§ã¯è¡ããªãããçè ã® ~/.zshrc ã®ããã³ããè¨å®é¨åã¯æ¦ã
ãããããã£ã¦ãã®ã¨ããzshã«é¢ä¿ãããã¨ããããããã£ã¦ããããã¦ããã§ããããã£ã¦ããã¡ã«æãã¤ãããã¨ãããã¾ãã¦ã ãããã¯zshã®RPROMPT(ããã³ããã®å³ç«¯ã«åºã¦ããæå)ã«ã¦ã¼ã¶åã¨ãã¹ãåãå ¥ããã¨ããè¨å®ããã¦ãã¾ããã§ãã¦ã¼ã¶åã¯é常ã¯é»è²ãªãã ãã©ãsuãããsudo -sãããããã¨ãã«ã¯èµ¤ããªããã¨ããè¨å®ã«ãã¦ãããããã¯ãªããªãç®ç«ã£ã¦ããããããã§ãã ã§ãã¾ããæã¯ããã§ããªãã£ããã ãè¿é ããæ» å¤ã«sudo -sãããªãããããããã¨è²ãå¤ãããã¨ã®ã¡ãªãããããã¾ãªããã§ãããã¾ãããã¾ããªãã¦ããã£ã¦ããæå³ã¯ãããã§ããã©ããã®ãè²ãå¤ãããã¨ããã®ã¯ã»ãã«æ´»ããããã§ã¯ãªããã¨åçªã«æãã¾ãã¦ããã¨ãã°ãããããªãã¹ãã§ä½æ¥ããã¨ãã«ã¯ãã·ã³ãã¨ã«è²ãå¤ããã¨è¦èªæ§ãä¸ãããã§ã¯ãªããã¨ã ã§ã¾ãã©ããããããªãã¨ã¡ãã£ã¨æã£ã¦ãããã試ã
ãã°ããåãããã³ãã³ãã®çµäºã¹ãã¼ã¿ã¹ãããã³ããã®è²ã«åæ ãããããã«ãã¦ããã çµäºã¹ãã¼ã¿ã¹ã¨ã¯ Cè¨èªãªã int main(int argc, char* argv[]) { ... return 0; } ãã® return ãã¦ãã 0 ãçµäºã¹ãã¼ã¿ã¹ããã®æ´æ°å¤ã®ä¸ä½ 8bit ãããã»ã¹ã®çµäºæã«è¦ª (ãã®ããã»ã¹ãèµ·åããããã»ã¹) ã«ãããã çµäºã¹ãã¼ã¿ã¹ã®æå®æ¹æ³ã¯ãããããããCè¨èªã®å ´å main é¢æ°ã®æ»ãå¤ä»¥å¤ã«ã exit é¢æ°ã®å¼æ°ã§ãæå®ã§ãããRuby, Perl ã®å ´åããããã main é¢æ°ã¯ç¡ã㦠exit é¢æ°ã«å¼æ°ãä¸ããæ¹æ³ã ããã¤ãããã ãã®å¤ã¯ã·ã§ã«ä¸ã§ $? ã§åç §ã§ããã % perl -e 'exit(0xdead)'; echo $? 173 % æ £ä¾ã¨ãã¦ãæ£å¸¸çµäºã®ã¨ã㯠0 ãè¿ããã¨ã«ãªã£ã¦ããã % ls
ä¹ ã ã«Emacsã®è©±é¡ã§ããtrampã£ã¦ä¾¿å©ã§ãããããã¼ã«ã«ã®Emacsã§sshå ã®ãã¡ã¤ã«ãç·¨éããããsudoãã¦root権éã§ç·¨éã§ãããããã®ã¯ç´ æ´ãããã¨æãã¾ããtrampã®ç´ æ´ããããç¥ããªã人ã¯ãä¸è¨ãµã¤ããªã©ãåç §ãã¦ãã ããã tramp version 2.1.14 ã¦ã¼ã¶ã¼ããã¥ã¢ã« Emacsã§ãªã¢ã¼ããµã¼ãä¸ã®ãã¡ã¤ã«ãrootã§ç·¨éãã - é«åè³æµ©ã®Keep-Alive ã¨ããã§ãzshããã°ã¤ã³ã·ã§ã«ã«ãã¦ããã¨trampãä¸æãåããªãç¾è±¡ã«åºãããã¾ããå ·ä½çã«ã¯ãã/sudo::/etc/hostsããªã©ãéããã¨ãã¦ä¸è¨ã®ããã«æããããã¨ãããã¾ãã tramp: Waiting 30s for remote `/bin/shâ to come up... apply: Couldnât `exec env âENV=â âPS1=$ â
ãã£ã¨bashã使ã£ã¦ããã§ããããã®åããããzshã«ãã¦è²ã è¨å®ããã®ã§è¦ãæ¸ãç¨åº¦ã«ãã¡ã¤ã³ã¯Macã§ä½¿ãã¾ãããä¸å¿Linuxã¨ãã§ãåãã«ãªãããã«ãã¦ãã¾ãã è£é ä½ã¯ã¨ãããzsh使ããªãããã ãã¯æå®ãã¦ããã¨ãããã¨ãªã®ã§ã autoload -U compinit compinit æåã³ã¼ã UTF-8ã«è¨å® export LANG=ja_JP.UTF-8 ããã³ãã ã«ã¬ã³ããã£ã¬ã¯ããªãã¦ã¼ã¶ã¼åã2è¡ã§è¡¨ç¤ºãè¦ãããããã«ä¸ã«æ¹è¡ãå ¥ãã¦ãã«ã¬ã³ããã£ã¬ã¯ããªã¯é»è²ã«ãã¾ãããã¨ã¹ã±ã¼ã使ãã¨ã³ããã§ããªãã®ã§colorsããã¼ããã¦ã¾ãã autoload colors colors PROMPT=" %{${fg[yellow]}%}%~%{${reset_color}%} [%n]$ " PROMPT2='[%n]> ' ãããªæãã å±¥æ´ å±¥æ´ãä¿åã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}