mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
implement set --show
This adds a new capability to the `set` command. It is similar to running `set` with no other arguments but provides far more detail about each variable. Such as whether it is set in each of the local, global, and universal scopes. And the values in each scope. You can also ask for specific variables to be shown. Fixes #4265
This commit is contained in:
15
tests/set.in
Normal file
15
tests/set.in
Normal file
@@ -0,0 +1,15 @@
|
||||
# Test various behaviors of the `set` command.
|
||||
|
||||
logmsg Verify behavior of `set --show` given an invalid var name
|
||||
set --show 'argle bargle'
|
||||
|
||||
echo '# Verify behavior of `set --show`'
|
||||
set -U var1 hello
|
||||
set --show var1
|
||||
|
||||
set -l var1
|
||||
set -g var1 goodbye "and don't come back"
|
||||
set --show var1
|
||||
|
||||
set -g var2
|
||||
set --show _unset_var var2
|
||||
Reference in New Issue
Block a user