-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interp: display all Bash's
shopt
option
Trying to set an unsupported but valid Bash option leads to a potentially confusing error message: ``` $ gosh -c "shopt -s extglob" shopt: invalid option name "extglob" ``` Fix that by handling the unsupported options differently from the invalid ones: ``` $ gosh -c "shopt -s extglob" bash: line 1: shopt: extglob off ("on" not supported) exit status 1 ``` Additionally, this commit lists all of the Bash options when `shopt` without arguments is called and explicitly identify the unsupported options, for example: ``` $ gosh -c "shopt" expand_aliases off globstar off nullglob off // .. cut for brevity hostcomplete on ("off" not supported) inherit_errexit on ("off" not supported) interactive_comments on ("off" not supported) ``` While at it, rewrite the `bashOptsTable` so that it can keep two option states: 1) Bash's default options and 2) whether we support it Fixes #877
- Loading branch information
1 parent
3d2e729
commit 7a93c0c
Showing
4 changed files
with
182 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters