-
Notifications
You must be signed in to change notification settings - Fork 611
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This enhances the `sdk` shell function we want to promote as the main way to Do Things In The SDK by introducing the `cd` subcommand to initialize and switch to a given project, by improving the help, by adding the `git-extra` project to the known projects, and by adding support for Tab completion (in the Git SDK Bash). It also updates the SDK installer to initialize a shallow clone of the Git mirror of the SDK instead of "Pacman'ing everything from scratch". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
- Loading branch information
Showing
5 changed files
with
125 additions
and
241 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
_sdk() | ||
{ | ||
local cur prev opts | ||
COMPREPLY=() | ||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
prev="${COMP_WORDS[COMP_CWORD-1]}" | ||
|
||
case "$prev" in | ||
build|cd|init) | ||
local projects=$(sdk valid_projects) | ||
COMPREPLY=($(compgen -W "$projects" -- $cur)) | ||
return 0 | ||
;; | ||
create-desktop-icon) | ||
return 1 | ||
;; | ||
esac | ||
|
||
opts=$(sdk valid_commands) | ||
COMPREPLY=($(compgen -W "$opts" -- $cur)) | ||
return 0 | ||
} | ||
complete -F _sdk sdk |
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
Oops, something went wrong.