From 2a96bc93c24f34a972740da3e7df031a2d36e7cb Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 24 Dec 2019 14:22:42 +0000 Subject: Align dollarat option priority to rightmost --- doc/dollarat.html | 5 +++-- src/execline/dollarat.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/dollarat.html b/doc/dollarat.html index 8249bd3..cb3d6eb 100644 --- a/doc/dollarat.html +++ b/doc/dollarat.html @@ -53,8 +53,9 @@ used. If delimchar is the empty string, then dollarat will output the positional parameters as a sequence of netstrings (and the -n option will be ignored). -
  • -0 : use the null character as separator. Any -d -argument will be ignored. Warning: this option should only be used to feed +
  • -0 : use the null character as separator. If this option +and the -d option are given concurrently, the rightmost one wins. +Warning: -0 should only be used to feed data to programs that know how to handle null-separated lists.
  • diff --git a/src/execline/dollarat.c b/src/execline/dollarat.c index 5bc5c1f..1b75027 100644 --- a/src/execline/dollarat.c +++ b/src/execline/dollarat.c @@ -28,7 +28,7 @@ int main (int argc, char const *const *argv) switch (opt) { case 'n' : nl = 0 ; break ; - case 'd' : delim = *l.arg ; break ; + case 'd' : delim = *l.arg ; zero = 0 ; break ; case '0' : zero = 1 ; break ; default : strerr_dieusage(100, USAGE) ; } -- cgit v1.2.3