use OPTARG to get key

This commit is contained in:
Rafael Accácio Nogueira 2020-02-10 11:36:55 +01:00 committed by GitHub
parent ae75326a40
commit b22f7005f8

View File

@ -22,8 +22,8 @@ fi
# org-capture key mapped to argument flags
# keys=$(emacsclient -e "(+org-capture-available-keys)" | cut -d '"' -f2)
while getopts hk opt; do
key="\"$opt\""
while getopts "hk:" opt; do
key="\"$OPTARG\""
break
done
shift $((OPTIND-1))