Merge pull request #77

Add `--config' and `--mkconfig' option
This commit is contained in:
oblique
2015-05-24 13:20:53 +03:00
2 changed files with 164 additions and 43 deletions

View File

@ -2,6 +2,14 @@
# Bash Completion routine for create_ap
#
_use_filedir() {
if [[ $(type -t _filedir) == "function" ]]; then
_filedir
return 0
fi
return 1
}
_create_ap() {
local awk_cmd='
($1 ~ /^-/) {
@ -114,11 +122,18 @@ _create_ap() {
# No Options
;;
--stop)
opts=$("$1" --list)
local stop_awk_cmd='$1 ~ /^[0-9]+$/'
opts=$("$1" --list | awk "$stop_awk_cmd")
;;
--list)
# No Options
;;
--mkconfig)
_use_filedir && return 0
;;
--config)
_use_filedir && return 0
;;
-g)
# Not going to implement
;;