fish-shell/src/builtins
Fabian Boehm 2c17d34971
Deprecate builtin test's one- and zero-argument modes (#10365)
This introduces a feature flag, "test-require-arg", that removes builtin test's zero and one argument special modes.

That means:

- `test -n` returns false
- `test -z` returns true
- `test -x` with any other option errors out with "missing argument"
- `test foo` errors out as expecting an option

`test -n` returning true is a frequent source of confusion, and so we are breaking with posix in this regard.

As always the flag defaults to off and can be turned on. In future it will default to on and then eventually be made read-only.

There is a new FLOG category "deprecated-test", run `fish -d deprecated-test` and it will show any test call that would change in future.
2024-04-21 14:25:54 +02:00
..
string Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
tests Make test_init() return a scope guard 2024-03-24 16:33:35 +01:00
abbr.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
argparse.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
bg.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
bind.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
block.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
builtin.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
cd.rs Add and use separate open_dir() method 2024-03-23 01:15:43 -05:00
command.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
commandline.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
complete.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
contains.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
count.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
disown.rs Remove using statements already imported by preludes 2024-02-28 09:41:51 -06:00
echo.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
emit.rs Remove widestring-suffix uses 2024-01-13 08:52:54 +01:00
eval.rs Use nix & Results 2024-02-11 11:40:27 -08:00
exit.rs Move fish-rust to project root 2024-01-13 03:58:33 +01:00
fg.rs Disable terminal protocols throughout evaluation 2024-04-02 21:25:47 +02:00
function.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
functions.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
history.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
jobs.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
math.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
mod.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
path.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
printf.rs Stop using num_traits in printf 2024-01-21 18:19:40 -08:00
pwd.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
random.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
read.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
realpath.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
return.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
set.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
set_color.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
shared.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
source.rs Change wopen_cloexec() to return File 2024-03-23 01:34:23 -05:00
status.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
string.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
test.rs Deprecate builtin test's one- and zero-argument modes (#10365) 2024-04-21 14:25:54 +02:00
type.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
ulimit.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00
wait.rs Rewrite wgetopt.rs to Rustier syntax and naming 2024-04-17 11:26:51 -07:00