èæ¯ .zsh_historyãè¦ããlsã³ãã³ãæã¡ãããªãã¨ã«æ°ãã¤ãã è§£æ±ºæ¡ ã³ãã³ãã©ã¤ã³ç©ºã§Enteræ¼ãããlsãã¦ã»ãã 解決ããã³ã¼ã alls() { zle accept-line if [[ -z "$BUFFER" ]]; then echo '' ls fi } zle -N alls bindkey "\C-m" alls 解説 ãã¨ãã¨ã®Enterã¯ãzleã®widgetã§ããaccept-lineãå²ãå½ã¦ããã¦ããã ãªã®ã§ãbindkeyã§å²ãå½ã¦ç´ãã¦ãaccept-lineãã¤ã¤ã³ãã³ãã©ã¤ã³ã®BUFFERã調ã¹ã¦ã空ãªãlsãå®è¡ããããã«ãã¦ããã ãã®ä»æ¹åæ¡ chpwd hookã§ãcdã®ãã³ã«lsãããããã«ãã filerãªã©ãæå¹æ´»ç¨ãã alias l=lsã¨ãã§æºè¶³ãã
{{#tags}}- {{label}}
{{/tags}}