Files
dotfiles/.config/fish/functions/_puffer_fish_expand_dots.fish
2025-01-10 02:01:36 +01:00

10 lines
308 B
Fish

function _puffer_fish_expand_dots -d 'expand ... to ../.. etc'
set -l cmd (commandline --cut-at-cursor)
set -l split (string split -- ' ' $cmd)
if string match --quiet --regex -- '^(\.\./)*\.\.$' $split[-1]
commandline --insert '/..'
else
commandline --insert '.'
end
end