Created
February 16, 2016 06:30
-
-
Save takuya/73d7fe2737536feb028b to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
### 補完関数。 | |
_tmutil(){ | |
list=$( tmutil | /usr/bin/grep -v ^$ | /usr/bin/grep ^Usage | awk '{print $3}' ) | |
COMPREPLY=( $(compgen -W "$list" ${COMP_WORDS[COMP_CWORD]} ) ) | |
} | |
complete -F _tmutil tmutil | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slightly modified