-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bash: refactor searching for subcommands on the command line
This patch adds the __git_find_subcommand function, which takes one argument: a string containing all subcommands separated by spaces. The function searches through the command line whether a subcommand is already present. The first found subcommand will be printed to standard output. This enables us to remove code duplications from completion functions for commands having subcommands. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
- Loading branch information
SZEDER Gábor
authored and
Shawn O. Pearce
committed
Mar 10, 2008
1 parent
1d17b22
commit 3ff1320
Showing
1 changed file
with
32 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters