learnbyexample@programming.dev to Linux@lemmy.mlEnglish · 11 months agoNavigating around in your shellblog.meain.ioexternal-linkmessage-square21fedilinkarrow-up176arrow-down14
arrow-up172arrow-down1external-linkNavigating around in your shellblog.meain.iolearnbyexample@programming.dev to Linux@lemmy.mlEnglish · 11 months agomessage-square21fedilink
minus-squarePlexSheep@feddit.delinkfedilinkarrow-up1·11 months agoWhat I use to automatically extend stuff like ls .... to ls ../../../.. function expand-dots() { local MATCH if [[ $LBUFFER =~ '(^| )\.\.\.+' ]]; then LBUFFER=$LBUFFER:fs%\.\.\.%../..% fi } function expand-dots-then-expand-or-complete() { zle expand-dots zle expand-or-complete } function expand-dots-then-accept-line() { zle expand-dots zle accept-line } zle -N expand-dots zle -N expand-dots-then-expand-or-complete zle -N expand-dots-then-accept-line bindkey '^I' expand-dots-then-expand-or-complete bindkey '^M' expand-dots-then-accept-line (for zsh)
What I use to automatically extend stuff like
ls ....
tols ../../../..
(for zsh)