bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why two separate option namespaces?


From: Martijn Dekker
Subject: Why two separate option namespaces?
Date: Mon, 27 Feb 2017 07:08:33 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

It is not clear to me why bash has two separate namespaces for
long-named shell options, handled by two separate commands.

It might make sense if 'set -o' is for POSIX options only and 'shopt'
for bash-specific options, but that doesn't apply. I can't figure out a
consistent basis for a distinction. This makes it a bit of a pain to
remember which option goes with which command, e.g. that 'pipefail' goes
with set, but 'lastpipe' goes with shopt.

What was the original reason behind this?

Since there currently are no naming conflicts between the two
namespaces, would there be any disadvantage to simply merging them and
allowing all options to be manipulated using either set or shopt?

Thanks,

- M.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]