diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-02-26 13:27:46 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-02-26 13:28:34 +1300 |
commit | da6f96a92ffed833e00e0f9d958ed4872dbf3e34 (patch) | |
tree | 9f4029e9114eee3999a2f06b0ab7cd284b5e002a | |
parent | Make traditional PGP decoding work again (diff) | |
download | dotfiles-da6f96a92ffed833e00e0f9d958ed4872dbf3e34.tar.gz dotfiles-da6f96a92ffed833e00e0f9d958ed4872dbf3e34.zip |
Remove error-prone git-add(1) completion
Just files and directories will do fine
-rw-r--r-- | ISSUES.markdown | 2 | ||||
-rw-r--r-- | bash/bash_completion.d/git.bash | 23 |
2 files changed, 0 insertions, 25 deletions
diff --git a/ISSUES.markdown b/ISSUES.markdown index 42e1524e..4c78a3f3 100644 --- a/ISSUES.markdown +++ b/ISSUES.markdown @@ -18,8 +18,6 @@ Known issues * I can't find a clean way of detecting a restricted shell for ksh instances to prevent trying to load anything fancy (works for Bash) * Zsh, either! $options[restricted] is "off" within the startup file -* Git completion for "add" is error-prone; probably best just to let it add - plain files * Would be good to complete the Makefile variables for NAME, EMAIL etc with educated guesses (`id -u`@`cat /etc/mailname`) etc rather than hardcoding my own stuff in there diff --git a/bash/bash_completion.d/git.bash b/bash/bash_completion.d/git.bash index 5cf42ed3..2bee169a 100644 --- a/bash/bash_completion.d/git.bash +++ b/bash/bash_completion.d/git.bash @@ -69,23 +69,6 @@ _git() { done return ;; - - # Untracked files - untracked_files) - local file - while IFS= read -rd '' file ; do - [[ -n $file ]] || continue - COMPREPLY[${#COMPREPLY[@]}]=$file - done < <(git ls-files \ - --directory \ - --exclude-standard \ - --no-empty-directory \ - --others \ - -z \ - -- "${COMP_WORDS[COMP_CWORD]}"'*' \ - 2>/dev/null) - return - ;; esac # Try to find the index of the Git subcommand @@ -117,12 +100,6 @@ _git() { # Test subcommand to choose completions case ${COMP_WORDS[sci]} in - # Complete with untracked, unignored files - add) - "${FUNCNAME[0]}" untracked_files - return - ;; - # Help on real subcommands (not aliases) help) "${FUNCNAME[0]}" subcommands |