Files
dotfiles/config/fish/functions/__z_clean.fish
2018-12-05 23:29:00 -05:00

11 lines
289 B
Fish

function __z_clean -d "Clean up .z file to remove paths no longer valid"
set -l tmpfile (mktemp $Z_DATA.XXXXXX)
if test -f $tmpfile
command awk -F "|" 'system("test -d \"" $1 "\"") == 0 { print $0 }' $Z_DATA > $tmpfile
command mv -f $tmpfile $Z_DATA
end
__z_complete
end