git: Install bash-completion symlink for gitk

Since bash-completion rules are loaded dynamically, the completion
rules for `gitk <Tab>` waere not being loaded until the user first
typed `git <Tab>`.  Fix this by adding a symlink named `gitk`.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2019-12-09 14:05:13 -08:00
parent 3140fa89c5
commit a16dbef1c1

View file

@ -230,6 +230,7 @@ stdenv.mkDerivation {
-e "s|exec wish|exec '${tk}/bin/wish'|g" \ -e "s|exec wish|exec '${tk}/bin/wish'|g" \
"$out/$prog" "$out/$prog"
done done
ln -s $out/share/git/contrib/completion/git-completion.bash $out/share/bash-completion/completions/gitk
'' else '' '' else ''
# Don't wrap Tcl/Tk, replace them by notification scripts # Don't wrap Tcl/Tk, replace them by notification scripts
for prog in bin/gitk libexec/git-core/git-gui; do for prog in bin/gitk libexec/git-core/git-gui; do