diff options
author | Marc Khouzam <marc.khouzam@ericsson.com> | 2013-02-02 19:43:25 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-03 18:59:34 -0800 |
commit | c6929ff239e2bd94fc52f6a3c4db3d5c5c5b0e8d (patch) | |
tree | da66aa902fb0d107f4a425eec230bf212aa96376 /builtin/fetch-pack.c | |
parent | git-completion.bash: add support for path completion (diff) | |
download | tgif-c6929ff239e2bd94fc52f6a3c4db3d5c5c5b0e8d.tar.xz |
completion: handle path completion and colon for tcsh script
Recent enhancements to git-completion.bash provide intelligent path
completion for git commands. Such completions do not provide the
'/' at the end of directories for recent versions of bash; instead,
bash itself will add the trailing slash to directories to the result
provided by git-completion.bash. However, the completion for tcsh
uses the result of the bash completion script directly, so it either
needs to add the necessary slash itself, or needs to ask the bash
script to keep the trailing slash.
Adding the slash itself is difficult because we have to check the
each path in the output of the bash script to see if it is meant to
be a directory or something else. For example, assuming there is a
directory named 'commit' in the current directory, then, when
completing
git add commit<tab>
we would need to add a slash, but for
git help commit<tab>
we should not.
Figuring out such differences would require adding much intelligence
to the tcsh completion script. Instead, it is simpler to ask the
bash script to keep the trailing slash. This patch does this.
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@ericsson.com>
Diffstat (limited to 'builtin/fetch-pack.c')
0 files changed, 0 insertions, 0 deletions