dotfiles/.config/fish/functions/_puffer_fish_expand_dots.fish
2023-07-16 18:24:42 +02:00

9 lines
318 B
Fish

function _puffer_fish_expand_dots -d 'expand ... to ../.. etc'
set -l cmd (commandline --cut-at-cursor)
set -l split (string split ' ' $cmd)
switch $split[-1]
case './*'; commandline --insert '.'
case '*..'; commandline --insert '/..'
case '*'; commandline --insert '.'
end
end