Closed capezotte closed 1 year ago
Yeah, I can see an option to elgetopt working here. I'll write that down for the next version of execline, thanks for the suggestion.
Please try elgetopt -D ""
with the latest execline git commit, and tell me if it's working for you.
Works for me. Thanks!
I used to use a command-line utility called
dmenu
, but came to like an alternative to it calledfuzzel
that has the same input and output format but has slightly different options.More specifically,
dmenu
had a-x
option, butfuzzel
's equivalent is called--password
.-x
in fuzzel does something completely different.In order not to rewrite all my scripts using
dmenu
due to this small difference, I thought of making/usr/local/bin/dmenu
an execline wrapper:Here comes the problem.
-l
and-p
work as intended (being omitted entirely if not given by the script), but when-x
is given, it comes out as--password1
which is an invalid option.The only alternatives I'm seeing are either
backtick { ifelse { eltest } ... }
+importas -s
ifthenelse
which shall not be documented.The solution I'm proposing is for
1
to be overrideable by the user. For instance, makingelgetopt
insert an empty word into the environment instead of 1 would make my script work.