mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-27 08:43:09 -03:00
@@ -56,6 +56,14 @@ pub fn r#builtin(
|
||||
return STATUS_INVALID_ARGS;
|
||||
}
|
||||
|
||||
// If we don't have either, we print our help.
|
||||
// This is also what e.g. command and time,
|
||||
// the other decorator/builtins do.
|
||||
if !opts.query && !opts.list_names {
|
||||
builtin_print_help(parser, streams, cmd);
|
||||
return STATUS_INVALID_ARGS;
|
||||
}
|
||||
|
||||
if opts.query {
|
||||
let optind = w.woptind;
|
||||
for arg in argv.iter().take(argc).skip(optind) {
|
||||
|
||||
@@ -9,4 +9,9 @@ builtin -nq string
|
||||
#CHECKERR: builtin: invalid option combination, --query and --names are mutually exclusive
|
||||
echo $status
|
||||
#CHECK: 2
|
||||
|
||||
builtin -- -q &| grep -q "builtin - run a builtin command\|fish: builtin: missing man page"
|
||||
echo $status
|
||||
#CHECK: 0
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user