Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
The "-" and "--" options (was Re: ${var:1:1:=y})
On Feb 3, 10:44pm, Eric Cook wrote:
} Subject: Re: ${var:1:1:=y}
}
} On 02/03/2015 10:25 PM, Bart Schaefer wrote:
} > All builtin commands other than precommand modifiers, even those that
} > have no options, can be given the argument `--' to terminate option
} > processing. [...] For historical reasons,
} > most builtin commands also recognize a single `-' in a separate word
} printf , test/[, set -A and maybe a few others are exceptions to those
} rules.
Also "echo" does NOT accept "--" in this way, it ONLY acceps a solitary
"-". I forget why that is.
printf : accepts -- but not -
test : accepts neither
set : the -A itself ends option processing, and "--" has added semantics
Messages sorted by:
Reverse Date,
Date,
Thread,
Author