зеркало из https://github.com/microsoft/git.git
Merge branch 'mk/tcsh-complete-only-known-paths'
The "complete with known paths only" update to completion scripts returns directory names without trailing slash to compensate the addition of '/' done by bash that reads from our completion result. tcsh completion code that reads from our internal completion result does not add '/', so let it ask our complletion code to keep the '/' at the end. * mk/tcsh-complete-only-known-paths: completion: handle path completion and colon for tcsh script
This commit is contained in:
Коммит
d03d820a8c
|
@ -52,6 +52,18 @@ cat << EOF > ${__git_tcsh_completion_script}
|
|||
|
||||
source ${__git_tcsh_completion_original_script}
|
||||
|
||||
# Remove the colon as a completion separator because tcsh cannot handle it
|
||||
COMP_WORDBREAKS=\${COMP_WORDBREAKS//:}
|
||||
|
||||
# For file completion, tcsh needs the '/' to be appended to directories.
|
||||
# By default, the bash script does not do that.
|
||||
# We can achieve this by using the below compatibility
|
||||
# method of the git-completion.bash script.
|
||||
__git_index_file_list_filter ()
|
||||
{
|
||||
__git_index_file_list_filter_compat
|
||||
}
|
||||
|
||||
# Set COMP_WORDS in a way that can be handled by the bash script.
|
||||
COMP_WORDS=(\$2)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче