diff --git a/bin/org-capture b/bin/org-capture index 15d6f0a34..d2e076cf5 100755 --- a/bin/org-capture +++ b/bin/org-capture @@ -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))