zsh feature, if command line empty, on enter show current dir content
This commit is contained in:
parent
fc232c4f80
commit
3a4ff6b5b9
@ -49,17 +49,6 @@ bindkey '^W' backward-delete-word
|
|||||||
bindkey -M vicmd '^H' backward-delete-char
|
bindkey -M vicmd '^H' backward-delete-char
|
||||||
|
|
||||||
|
|
||||||
listdirquiet() {
|
|
||||||
echo
|
|
||||||
ls
|
|
||||||
echo
|
|
||||||
zle reset-prompt
|
|
||||||
}
|
|
||||||
zle -N listdirquiet
|
|
||||||
bindkey "^L" listdirquiet
|
|
||||||
bindkey -M vicmd "^L" listdirquiet
|
|
||||||
|
|
||||||
|
|
||||||
gitstatusquiet() {
|
gitstatusquiet() {
|
||||||
echo
|
echo
|
||||||
git status
|
git status
|
||||||
@ -67,8 +56,8 @@ gitstatusquiet() {
|
|||||||
zle reset-prompt
|
zle reset-prompt
|
||||||
}
|
}
|
||||||
zle -N gitstatusquiet
|
zle -N gitstatusquiet
|
||||||
bindkey "^N" gitstatusquiet
|
bindkey "^L" gitstatusquiet
|
||||||
bindkey -M vicmd "^N" gitstatusquiet
|
bindkey -M vicmd "^L" gitstatusquiet
|
||||||
|
|
||||||
|
|
||||||
popdquiet() {
|
popdquiet() {
|
||||||
@ -86,4 +75,20 @@ cddotdot() {
|
|||||||
}
|
}
|
||||||
zle -N cddotdot
|
zle -N cddotdot
|
||||||
bindkey "^O" cddotdot
|
bindkey "^O" cddotdot
|
||||||
bindkey -M vicmd "^O" cddotdot
|
bindkey -M vicmd "^O" cddotdot
|
||||||
|
|
||||||
|
|
||||||
|
accept-line-or-list-dir() {
|
||||||
|
if [ -z "${LBUFFER}${RBUFFER}" ]; then
|
||||||
|
echo
|
||||||
|
ls
|
||||||
|
echo
|
||||||
|
zle reset-prompt
|
||||||
|
else
|
||||||
|
zle .accept-line
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N accept-line-or-list-dir
|
||||||
|
bindkey "^M" accept-line-or-list-dir
|
||||||
|
bindkey -M vicmd "^M" accept-line-or-list-dir
|
||||||
Loading…
x
Reference in New Issue
Block a user