mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 14:51:15 -03:00
Add builtin -q
Used to query for a builtin's existence, like `type -q` and `functions -q` can be used to query for a things and a functions existence respectively.
This commit is contained in:
2
tests/test_builtinbuiltin.err
Normal file
2
tests/test_builtinbuiltin.err
Normal file
@@ -0,0 +1,2 @@
|
||||
builtin: Invalid combination of options,
|
||||
--query and --names are mutually exclusive
|
||||
7
tests/test_builtinbuiltin.in
Normal file
7
tests/test_builtinbuiltin.in
Normal file
@@ -0,0 +1,7 @@
|
||||
# Tests for the "builtin" builtin/keyword.
|
||||
builtin -q string; and echo String exists
|
||||
builtin -q; and echo None exists
|
||||
builtin -q string echo banana; and echo Some of these exist
|
||||
builtin -nq string
|
||||
echo $status
|
||||
exit 0
|
||||
3
tests/test_builtinbuiltin.out
Normal file
3
tests/test_builtinbuiltin.out
Normal file
@@ -0,0 +1,3 @@
|
||||
String exists
|
||||
Some of these exist
|
||||
2
|
||||
Reference in New Issue
Block a user