mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-22 01:51:14 -03:00
Read arguments with fish -c
This reads any additional positional arguments given to `fish -c` into $argv. We don't handle the first argument specially (as `$0`) as that's confusing and doesn't seem very useful. Fixes #2314.
This commit is contained in:
@@ -8,7 +8,7 @@ Synopsis
|
||||
|
||||
::
|
||||
|
||||
fish [OPTIONS] [-c command] [FILE [ARGUMENTS...]]
|
||||
fish [OPTIONS] [-c command] [FILE] [ARGUMENTS...]
|
||||
|
||||
Description
|
||||
-----------
|
||||
@@ -17,7 +17,7 @@ fish is a command-line shell written mainly with interactive use in mind. This p
|
||||
|
||||
The following options are available:
|
||||
|
||||
- ``-c`` or ``--command=COMMANDS`` evaluate the specified commands instead of reading from the commandline
|
||||
- ``-c`` or ``--command=COMMANDS`` evaluate the specified commands instead of reading from the commandline, passing any additional positional arguments via :ref:`$argv <variables-argv>`. Note that, unlike other shells, the first argument is *not* the name of the program (``$0``), but simply the first normal argument.
|
||||
|
||||
- ``-C`` or ``--init-command=COMMANDS`` evaluate the specified commands after reading the configuration, before running the command specified by ``-c`` or reading interactive input
|
||||
|
||||
|
||||
Reference in New Issue
Block a user