2018-01-02 13:00:12 -05:00
|
|
|
# fish
|
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
> The Friendly Interactive SHell, a command-line interpreter designed to be user friendly.
|
2019-06-07 11:58:13 +01:00
|
|
|
> More information: <https://fishshell.com>.
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
- Start an interactive shell session:
|
2018-01-02 13:00:12 -05:00
|
|
|
|
|
|
|
`fish`
|
|
|
|
|
2021-11-26 06:46:27 +10:00
|
|
|
- Start an interactive shell session without loading startup configs:
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2021-11-26 06:46:27 +10:00
|
|
|
`fish --no-config`
|
|
|
|
|
2022-06-08 18:09:31 +10:00
|
|
|
- Execute specific commands:
|
2021-11-26 06:46:27 +10:00
|
|
|
|
2022-06-08 18:09:31 +10:00
|
|
|
`fish --command "{{echo 'fish is executed'}}"`
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2022-06-08 18:09:31 +10:00
|
|
|
- Execute a specific script:
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
`fish {{path/to/script.fish}}`
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2022-06-08 18:09:31 +10:00
|
|
|
- Check a specific script for syntax errors:
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
`fish --no-execute {{path/to/script.fish}}`
|
|
|
|
|
2022-12-04 08:53:34 +01:00
|
|
|
- Execute specific commands from `stdin`:
|
2022-06-08 18:09:31 +10:00
|
|
|
|
|
|
|
`{{echo "echo 'fish is executed'"}} | fish`
|
|
|
|
|
2021-04-14 10:07:21 -04:00
|
|
|
- Start an interactive shell session in private mode, where the shell does not access old history or save new history:
|
|
|
|
|
|
|
|
`fish --private`
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2021-11-26 06:46:27 +10:00
|
|
|
- Define and export an environmental variable that persists across shell restarts (builtin):
|
2018-01-02 13:00:12 -05:00
|
|
|
|
2021-11-26 06:46:27 +10:00
|
|
|
`set --universal --export {{variable_name}} {{variable_value}}`
|