Commit Graph

8 Commits

Author SHA1 Message Date
ridiculousfish
782cae2d21 Add status subcomannds: features and test-feature
This teaches the status command to work with features.
'status features' will show a table listing all known features and whether
they are currently on or off.
`status test-feature` will test an individual feature, setting the exit status to
0 if the feature is on, 1 if off, 2 if unknown.
2018-05-06 11:20:14 -07:00
Georgy Yakovlev
58425ed463 Do not redirect to / in status.in/err test. 2017-08-17 10:22:30 -07:00
Marc Garcia Sastre
980af4aa5b status returns the function name when called with -u parameter
Fixes #1743
2017-04-26 20:15:45 -07:00
Kurtis Rader
9e922a6e02 make status saner vis-a-vis arg parsing
The `status` command currently silently allows incompatible flags (i.e.,
subcommands). Too, using flags to specify subcommands misleads the user
into thinking they can specify multiple subcommands.

We recently modified the `history` command to deprecate using flags for
subcommands. This change does the same for the `status` command.

Fixes #3509
2016-11-07 12:11:08 -08:00
Kevin Ballard
184110c2e7 Revert "tests/status.in: fix test for locale, fall back to default strings"
This reverts commit 3b3fde1c5e.
2014-11-25 00:51:39 -08:00
David Adam
3b3fde1c5e tests/status.in: fix test for locale, fall back to default strings 2014-11-25 16:00:04 +08:00
Kevin Ballard
3616dd5889 Base status -b off the parser execution stack
Instead of globally marking the state as "in block" when evaluating
blocks/functions, update the "in block" status when pushing/popping
blocks on the parser stack.

Fixes #1729.

On a side note, `status -b` is actually pretty useless, because it
always returns 0 inside of a function (even without this patch).
2014-09-30 20:58:45 -07:00
Kevin Ballard
51527612d3 Don't leave is_block in bad state after bad redirection
Fixes #1728.
2014-09-30 17:06:56 -07:00