Closed an9wer closed 3 years ago
Hi, there is an error occurred in line 215 when I run subs (my /bin/sh is linked to bash which version is 5.0.18):
subs
/bin/sh
bash
$ ./subs ./subs: line 215: 'dmenu: command not found Interrupted
I've install dmenu command, so why does this happen?
dmenu
But then I noticed the dmenu is prefix with a single quote ('dmenu), I found that the cause of this error is the code in line 24:
'dmenu
: "${SUBS_MENU_PROG:='dmenu -p Subs:'}"
I think there is no need to wrap dmenu command with single quotes here.
Below is my proof:
Start an interactive bash, run with single quotes wrapped:
$ : "${SUBS_MENU_PROG:='dmenu -p Subs:'}" $ declare -p SUBS_MENU_PROG declare -- SUBS_MENU_PROG="'dmenu -p Subs:'"
Start ahother interactive bash, run without single quotes wrapped:
$ : "${SUBS_MENU_PROG:=dmenu -p Subs:}" $ declare -p SUBS_MENU_PROG declare -- SUBS_MENU_PROG="dmenu -p Subs:"
You are correct, that is an oversight by me! Also needs the -l flag to list vertically.
-l
Hi, there is an error occurred in line 215 when I run
subs
(my/bin/sh
is linked tobash
which version is 5.0.18):I've install
dmenu
command, so why does this happen?But then I noticed the
dmenu
is prefix with a single quote ('dmenu
), I found that the cause of this error is the code in line 24:I think there is no need to wrap
dmenu
command with single quotes here.Below is my proof:
Start an interactive bash, run with single quotes wrapped:
Start ahother interactive bash, run without single quotes wrapped: