diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-02-11 16:59:57 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-02-11 16:59:57 +0000 |
commit | f3486929d0e96e369a91d68893531b7d8aff1f00 (patch) | |
tree | ed3b71660359c072794ee7e1b8804322fa3e692a | |
parent | f9b855a56b13708e2224efa54060b90539406383 (diff) | |
download | execline-f3486929d0e96e369a91d68893531b7d8aff1f00.tar.gz execline-f3486929d0e96e369a91d68893531b7d8aff1f00.tar.xz execline-f3486929d0e96e369a91d68893531b7d8aff1f00.zip |
Change backtick option to -x
-rw-r--r-- | doc/backtick.html | 4 | ||||
-rw-r--r-- | src/execline/backtick.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/backtick.html b/doc/backtick.html index e5a889d..14cc031 100644 --- a/doc/backtick.html +++ b/doc/backtick.html @@ -30,7 +30,7 @@ environment variable, then executes another program. </p> <pre> - backtick [ -i | -I | -d | -D <em>default</em> ] [ -N | -n ] [ -E | -e ] <em>variable</em> { <em>prog1...</em> } <em>prog2...</em> + backtick [ -i | -I | -x | -D <em>default</em> ] [ -N | -n ] [ -E | -e ] <em>variable</em> { <em>prog1...</em> } <em>prog2...</em> </pre> <ul> @@ -70,7 +70,7 @@ or 124 if <em>prog1</em> wrote a null character. This is the default. </li> the start of <em>prog1...</em>'s output is, up to the first null character, or to whatever <em>prog1...</em> wrote before crashing; chomping is applied if required; then execution proceeds. </li> - <li> <tt>-d</tt> : <em>variable</em> is <strong>removed</strong> from + <li> <tt>-x</tt> : <em>variable</em> is <strong>removed</strong> from the environment, and execution proceeds. </li> <li> <tt>-D <em>default</em></tt> : the value of <em>variable</em> is set to <em>default</em>, and execution proceeds. </li> diff --git a/src/execline/backtick.c b/src/execline/backtick.c index 93d5828..5c0c7bb 100644 --- a/src/execline/backtick.c +++ b/src/execline/backtick.c @@ -12,7 +12,7 @@ #include <execline/execline.h> -#define USAGE "backtick [ -i | -I | -D default ] [ -N | -n ] [ -E | -e ] var { prog... } remainder..." +#define USAGE "backtick [ -i | -I | -x | -D default ] [ -N | -n ] [ -E | -e ] var { prog... } remainder..." #define dieusage() strerr_dieusage(100, USAGE) int main (int argc, char const **argv, char const *const *envp) @@ -27,7 +27,7 @@ int main (int argc, char const **argv, char const *const *envp) PROG = "backtick" ; for (;;) { - int opt = subgetopt_r(argc, argv, "iINndD:Ee", &localopt) ; + int opt = subgetopt_r(argc, argv, "iINnxD:Ee", &localopt) ; if (opt < 0) break ; switch (opt) { @@ -35,7 +35,7 @@ int main (int argc, char const **argv, char const *const *envp) case 'I' : insist = 0 ; break ; case 'N' : chomp = 0 ; break ; case 'n' : chomp = 1 ; break ; - case 'd' : insist = 1 ; def = 0 ; break ; + case 'x' : insist = 1 ; def = 0 ; break ; case 'D' : insist = 1 ; def = localopt.arg ; break ; case 'E' : doimport = 1 ; break ; case 'e' : doimport = 0 ; break ; |