config/fish/functions/expand_dots.fish

13 lines
354 B
Fish

# https://github.com/nickeb96/puffer-fish
function expand_dots -d 'Expand ... to ../..'
set -l item (string split ' ' (commandline --cut-at-cursor))[-1]
switch $item
case './*'
commandline --insert '.'
case '*..'
commandline --insert '/..'
case '*'
commandline --insert '.'
end
end