mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 16:57:47 +08:00
docs: Add glob example to variable overrides
And clarify that it'll still run the same things
This commit is contained in:
parent
e2fb645c0c
commit
1285957703
|
@ -979,6 +979,13 @@ Multiple elements can be given in a :ref:`brace expansion<expand-brace>`::
|
|||
# Call bash with a reasonable default path.
|
||||
PATH={/usr,}/{s,}bin bash
|
||||
|
||||
Or with a :ref:`glob <expand-wildcard>`::
|
||||
|
||||
# Run vlc on all mp3 files in the current directory - if no file exists it will still be run with no arguments
|
||||
mp3s=*.mp3 vlc $mp3s
|
||||
|
||||
Unlike other shells, this does *not* inhibit any lookup (aliases or similar). Calling a command after setting a variable override will result in the exact same command being run.
|
||||
|
||||
This syntax is supported since fish 3.1.
|
||||
|
||||
.. _variables-universal:
|
||||
|
|
Loading…
Reference in New Issue
Block a user