Added config option
This commit is contained in:
@@ -74,7 +74,7 @@ _sns()
|
||||
{
|
||||
COMPREPLY=()
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local commands="--create --delete --edit --help --print --list --init\
|
||||
local commands="--create --config --delete --edit --help --print --list --init\
|
||||
-c -d -e -h -p -l -i"
|
||||
if [[ $COMP_CWORD -gt 1 ]]; then
|
||||
local lastarg="${COMP_WORDS[$COMP_CWORD-1]}"
|
||||
|
||||
@@ -105,6 +105,15 @@ else
|
||||
CREATE="TRUE"
|
||||
OP="TRUE"
|
||||
;;
|
||||
--config)
|
||||
if [ -z "$EDITOR" ]; then
|
||||
printf "$YELLOW_COLOR!$RESET_COLOR - %s\n"\
|
||||
"No editor defined. Defaulting to vi."
|
||||
EDITOR=vi
|
||||
fi
|
||||
"$EDITOR" "$CONFIG_FILE"
|
||||
exit 0;
|
||||
;;
|
||||
-d|--delete)
|
||||
DELETE="TRUE"
|
||||
OP="TRUE"
|
||||
|
||||
Reference in New Issue
Block a user