3 ms·
For Zsh, there are better stuff available. For example, you can use `cd +<tab>` to change to a past directory. And instead of aliases for `.....`, you can use:
by vbernat 5y ago
For Zsh, there are better stuff available. For example, you can use `cd +<tab>` to change to a past directory. And instead of aliases for `.....`, you can use:
# Expand ... to ../..
function vbe-expand-dot-to-parent-directory-path() {
case $LBUFFER in
(./..|* ./..) LBUFFER+='.' ;; # In Go: "go list ./..."
(..|*[ /=]..) LBUFFER+='/..' ;;
(*) LBUFFER+='.' ;;
esac
}
zle -N vbe-expand-dot-to-parent-directory-path
bindkey "." vbe-expand-dot-to-parent-directory-path
bindkey -M isearch "." self-insert
- mraza007 5y agoThanks for sharing this I’ll try this out