Files
dotfiles/config/fish/functions/_puffer_fish_expand_dots.fish
2025-06-11 13:40:36 +03: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