git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/6] Only load .exe suffix'd completions on Cygwin.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 5, 2006, 11:20 UTC
Message-ID
<20061105112025.GB20495@spearce.org>

The only platform which actually needs to define .exe suffixes as part of its completion set is Cygwin. So don't define them on any other platform.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 contrib/completion/git-completion.bash |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index fdfbf95..926638d 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -350,6 +350,7 @@ complete -o default -o nospace -F _git_l
 # when the user has tab-completed the executable name and consequently
 # included the '.exe' suffix.
 #
+if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
 complete -o default -o nospace -F _git git.exe
 complete -o default            -F _git_branch git-branch.exe
 complete -o default -o nospace -F _git_cat_file git-cat-file.exe
@@ -361,3 +362,4 @@ complete -o default            -F _git_m
 complete -o default -o nospace -F _git_push git-push.exe
 complete -o default -o nospace -F _git_log git-show-branch.exe
 complete -o default -o nospace -F _git_log git-whatchanged.exe
+fi
-- 
1.4.3.3.g9621
Message 1 of 1 in “Only load .exe suffix'd completions on Cygwin.”
  1. 2/6 Only load .exe suffix'd completions on Cygwin.Shawn O. Pearce, Nov 5, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.