Skip to content

interp: display all options for bash's shopt and explicitly state unsupported ones #877

@riacataquian

Description

@riacataquian

We don't support all of bash's shell options, at the moment we support these three:

$ gosh -c "shopt"
expand_aliases	off
globstar	off
nullglob	off

Bash actually has more options than what's listed above, see shopt documentation but we only print what's supported which could be misleading and unhelpful, eg when someone looks up for an option shopt | grep extglob, they'll get empty results.

Also trying to set an unsupported bash option leads to a confusing error message:

$ gosh -c "shopt -s extglob"
shopt: invalid option name "extglob"

We could improve the error message by explicitly saying it is instead unsupported.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions