From b22f7005f8e91bd45d16d64a8fa1dee982bc1d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Acc=C3=A1cio=20Nogueira?= Date: Mon, 10 Feb 2020 11:36:55 +0100 Subject: [PATCH] use OPTARG to get key --- bin/org-capture | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))