Only match "$HOME" instead of "-"

This could cause issues with bm-dirs containing a dash in their file name.
This commit is contained in:
krisdoodle45 2021-09-01 10:44:11 +02:00 committed by GitHub
parent 3d2d4603a9
commit 9ad2be86a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ cmd bulkrename $vidir
# Bindings
map <c-f> $lf -remote "send $id select '$(fzf)'"
map J $lf -remote "send $id cd $(awk '{ gsub(/#.*/, ""); } !/^$/ { print $2 }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed "s/\${.*-// ; s/}//" | envsubst)"
map J $lf -remote "send $id cd $(awk '{ gsub(/#.*/, ""); } !/^$/ { print $2 }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed "s/.*\$HOME/\$HOME/ ; s/}//" | envsubst)"
map gh
map g top
map D delete