-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fd5c762
Showing
8 changed files
with
158 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Copyright 2017 Tony Williams ([email protected]) | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
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,10 @@ | ||
## bash completion for Apple tools | ||
|
||
These are a number of scripts designed to add programmable completion to `bash` for | ||
some of the command line tools | ||
They complete the options for each tool, the completion cuts in after `-` or `--`. | ||
|
||
If you have installed bash completion using `brew` then drop the files | ||
into `/usr/local/etc/bash_completion.d/` (or link them) and open a new Terminal window. | ||
|
||
Feedback, bug reports and comments would be greatly appreciated. |
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 @@ | ||
# Bash completion for dscl | ||
# by Tony Williams, [email protected] | ||
# version 0.2 | ||
# 18/05/2017 | ||
|
||
_dscl() { | ||
local cur opts | ||
COMPREPLY=() | ||
|
||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
opts="-P -append -auth -authonly -cd -change -changei -create -createpl \ | ||
-createpli -delete -deletepl -deletepli -diff -f -list -merge -p -passwd \ | ||
-plist -popd -pushd -raw -read -readall -readpl -readpli -search -u" | ||
|
||
case "$cur" in | ||
-*) | ||
COMPREPLY=($(compgen -W "$opts" - "$cur")) | ||
return | ||
;; | ||
esac | ||
} | ||
|
||
complete -o bashdefault -o default -F _dscl dscl |
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 @@ | ||
# Bash completion for dsimport | ||
# by Tony Williams, [email protected] | ||
# version 0.2 | ||
# 18/05/2017 | ||
|
||
_dsimport() { | ||
local cur opts | ||
COMPREPLY=() | ||
|
||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
opts="--crypt --force --groupid --grouppreset --help --loglevel --outputfile --password --\ | ||
--recordformat --recordtype --remotehost --remotepassword --remoteusername --startid | ||
--template --username --userpreset --version" | ||
|
||
case "$cur" in | ||
--*) | ||
COMPREPLY=($(compgen -W "$opts" -- "$cur")) | ||
return | ||
;; | ||
esac | ||
} | ||
|
||
complete -o bashdefault -o default -F _dsimport dsimport |
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,24 @@ | ||
# Bash completion for installer | ||
# by Tony Williams, [email protected] | ||
# version 0.2 | ||
# 18/05/2017 | ||
|
||
_installer() { | ||
local cur opts | ||
COMPREPLY=() | ||
|
||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
opts="-allowUntrusted -applyChoiceChangesXML -config -dominfo -dumplog -file -help -lang \ | ||
-listiso -pkg -installer -plist -query -showChoiceChangesXML \ | ||
-showChoicesAfterApplyingChangesXML -showChoicesXML -store -target \ | ||
-verbose -verboseR -vers -volinfo" | ||
|
||
case "$cur" in | ||
-*) | ||
COMPREPLY=($(compgen -W "$opts" -- "$cur")) | ||
return | ||
;; | ||
esac | ||
} | ||
|
||
complete -o bashdefault -o default -F _installer installer |
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 @@ | ||
# Bash completion for pkgbuild | ||
# by Tony Williams, [email protected] | ||
# version 0.2 | ||
# 18/05/2017 | ||
|
||
_pkgbuild() { | ||
local cur opts | ||
COMPREPLY=() | ||
|
||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
opts="--analyze --cert --component --component-plist --filter --identifier \ | ||
--install-location --keychain --nopayload --ownership --prior --quiet --root \ | ||
--scripts --sign --timestamp --timestamp=none --version" | ||
|
||
case "$cur" in | ||
--*) | ||
COMPREPLY=($(compgen -W "$opts" "$cur")) | ||
return | ||
;; | ||
esac | ||
} | ||
|
||
complete -o bashdefault -o default -F _pkgbuild pkgbuild |
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,25 @@ | ||
# Bash completion for pkginfo | ||
# by Tony Williams, [email protected] | ||
# version 0.2 | ||
# 18/05/2017 | ||
|
||
_pkginfo() { | ||
local cur opts | ||
COMPREPLY=() | ||
|
||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
opts="--bom --check-signature --edit-pkg --expand --export-plist --file-info \ | ||
--file-info-plist --files --flatten --force --forget --groups --groups-pkgs \ | ||
--groups-plist --help --learn --only-dirs --only-files --packages --payload-files \ | ||
--pkg-groups --pkg-info --pkg-info-plist --pkgs-plist --pkgs= --regexp --repair | ||
--verbose --verify --volume" | ||
|
||
case "$cur" in | ||
--*) | ||
COMPREPLY=($(compgen -W "$opts" "$cur")) | ||
return | ||
;; | ||
esac | ||
} | ||
|
||
complete -o bashdefault -o default -F _pkginfo pkginfo |
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,24 @@ | ||
# Bash completion for pkgutil | ||
# by Tony Williams, [email protected] | ||
# version 0.1 | ||
# 19/05/2017 | ||
|
||
_pkgutil() { | ||
local cur opts | ||
COMPREPLY=() | ||
|
||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
opts="--bom --check-signature --edit-pkg --expand --export-plist --file-info \ | ||
--file-info-plist --files --flatten --force --forget --group-pkgs --groups-plist \ | ||
--help --learn --only-dirs --only-files --payload-files --pkg-groups --pkg-info \ | ||
--pkg-info-plist --pkgs --pkgs-plist --regexp --repair --verbose --verify --volume" | ||
|
||
case "$cur" in | ||
--*) | ||
COMPREPLY=($(compgen -W "$opts" -- "$cur")) | ||
return | ||
;; | ||
esac | ||
} | ||
|
||
complete -o bashdefault -o default -F _pkgutil pkgutil |