1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-08-16 16:20:38 +03:00

rc tools git: quote $kak_buffile for add/rm

Our "git add" and "git rm" default to the current file.  The shell
interprets globs in the filename, which can lead to surprising results,
for example if it's accidentally used on a scratch buffer like *git*.
This commit is contained in:
Johannes Altmanninger 2024-02-11 10:48:11 +01:00 committed by Maxime Coste
parent 4101e18144
commit b838d58e1a

View File

@ -713,7 +713,7 @@ define-command -params 1.. \
add|rm)
cmd="$1"
shift
run_git_cmd $cmd "${@:-${kak_buffile}}"
run_git_cmd $cmd "${@:-"${kak_buffile}"}"
;;
reset|checkout)
run_git_cmd "$@"