ãå±¥æ´ãçµããã¿ãªããæ£è¦è¡¨ç¾ã§æ¤ç´¢ããããã使ã£ã¦ã¿ã
id:deruiã«ããzshã®å±¥æ´ãã¤ã³ã¯ãªã¡ã³ã¿ã«ã«æ£è¦è¡¨ç¾æ¤ç´¢ããzshã¹ã¯ãªãããã¤ã³ã¯ãªã¡ã³ã¿ã«æ¤ç´¢ã ã®çµãè¾¼ã¿æ¤ç´¢ã ã®ã¨èãã¦ããã«é£ã³ä»ãã®ãanythingè³ã®ãµã¬ã¨ãããã®ã
ãã¤ã¹ã¢ã¤ãã¢!!ãã¼ããããã³ã«åæã«çµãè¾¼ã¾ãã¦ããã®ãanything.elã£ã½ãã
ãããããã¼ãæ¼ããã³ã«åå¿ãã¦ãã¾ãããéãããã®ãå¯ä¸ã®åé¡ã§ãããéãã解æ¶ããæ¹æ³ã¨ãã¦ã¯ä»¥ä¸ãèããããã
- ãã¼ãæ¼ãã¦0.3ç§éå¿çããªããã°æ¤ç´¢å¦çãéå§ãã(anythingæ¹å¼)
- ååã®æ¤ç´¢å¦çã®çµæããçµãè¾¼ã(QuickSilveræ¹å¼)
- .zsh_historyãé«éã«å±¥æ´æ¤ç´¢ããå°ç¨ããã°ã©ã ãä½æãããã¤ãã¨ãã§éä¿¡ãã(ã³ãã³ãèµ·åããªã¼ãã¼ãããã®å ´å)
$ wc ~/.zsh_history 85970 342643 3865720 /m/home/rubikitch/.zsh_history
anythingè³ã¨ãã¦ã¯ãæ¤ç´¢ã¯ã¨ãªã«ãfoo barããå ¥ããå ´åãfooã¨barãå«ãè¡ãåºåãããæ©è½ãæ¯éã¨ã欲ãããanything-match-pluginæ¹å¼ã®çµãè¾¼ã¿ã ãããã¯æ£è¦è¡¨ç¾ããã¢ããªãããã«grepãå¼ã¶ãªãããã°å¯è½ãªæ°ãããã
ä»»æã®ä½ç½®ã§AãPãæ¼ãã¨(ããã¨å¤§æåã®ã¿ã«ãã¦ãã¾ã)ããã®ä½ç½®ã®å±¥æ´ãå ¥åããããã¨ãã寸æ³ã§ãã
ããã¯åæ¡!æ¬å®¶anythingã«åãè¾¼ãã§ãããã¨æã£ããåè£é¸æãCtrl+çªå·ã§è¡ããããã«ããæ©è½*1ã¯æãããã£ãã®ã ããæ¼ãã¥ãããã使ã£ã¦ããªãã£ãããããããã¼ã ãã¸ã·ã§ã³ã«ããæåã大æåã§æã¤ã®ã¯æ¥½ãªã®ã§ããã¨æãã
anything.elã§ã¯ãããªæã
Emacsçã§ã¯anything-complete-shell-historyã³ãã³ãã該å½ããæåã§ãããä¾åããEmacs Lispãå¤ãããããã§è©¦ããã¨ãã§ããã
M-x install-elisp-from-emacswiki shell-history.el
M-x install-elisp-from-emacswiki anything.el
M-x install-elisp-from-emacswiki anything-config.el
M-x install-elisp-from-emacswiki anything-match-plugin.el
M-x install-elisp-from-emacswiki anything-complete.el
ã§ã.emacsã«å ããè¨å®ã¯ãã®1è¡ã
(require 'anything-complete)
zshãanythingã«ãªã£ã¦ãããããããªã¼ã¨ã ãã¶åããå¦æ³ãã¦ããã®ã ãã件ã®ã¹ã¯ãªãããå
æãä¸ãã¦ãããã¨æãã
å½é¢ãå±¥æ´çµãè¾¼ã¿æ¤ç´¢ãå¿
è¦ã«ãªã£ãã edit-command-line ã§emacsï¼gnuclient or emacsclientï¼ãå¼ã㧠anything-complete-shell-history ãå¼ã¶ãã¨ã«ããã
autoload -U edit-command-line zle -N edit-command-line bindkey "^O" edit-command-line
ã¨ã«ãããå ¥åã«é¢ãã¦ã¯ä¸æ¦Emacsã«å ¥ã£ã¦ãã¾ãã°ç¡æµã !!
*1:anything-enable-digit-shortcutsãtã«ããã°ããã