Recent enhancements to git-completion.bash provide intelligent path completion for git commands. Such completions do not add the '/' at the end of directories for recent versions of bash. However, the '/' is needed by tcsh, so we must tell the bash script to append it by using a compatibility method available for older bash versions. Also, tcsh does not handle the colon as a completion separator so we remove it from the list of separators. Signed-off-by: Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> --- Hi, Here is the update for tcsh completion which is needed to handle the cool new path completion feature just pushed to 'next'. Also, Manlio reported that tcsh completion was broken when using the colon, and this patch fixes the issue. I haven't quite figured out the process to indicate which branch a patch is meant for. Do I just mention it in the email? Or are all patches meant for the 'pu' branch? In this case, 'pu' or 'next' would be appropriate. Thanks! Marc contrib/completion/git-completion.tcsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contrib/completion/git-completion.tcsh b/contrib/completion/git-completion.tcsh index 3e3889f..eaacaf0 100644 --- a/contrib/completion/git-completion.tcsh +++ b/contrib/completion/git-completion.tcsh @@ -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) -- 1.8.1.367.g8e14972.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html