2018-01-02 18:00:12 +00:00
|
|
|
# fish
|
|
|
|
|
2021-04-14 15:07:21 +01: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 18:00:12 +00:00
|
|
|
|
2021-04-14 15:07:21 +01:00
|
|
|
- Start an interactive shell session:
|
2018-01-02 18:00:12 +00:00
|
|
|
|
|
|
|
`fish`
|
|
|
|
|
2021-11-25 20:46:27 +00:00
|
|
|
- Start an interactive shell session without loading startup configs:
|
2018-01-02 18:00:12 +00:00
|
|
|
|
2021-11-25 20:46:27 +00:00
|
|
|
`fish --no-config`
|
|
|
|
|
2022-06-08 09:09:31 +01:00
|
|
|
- Execute specific commands:
|
2021-11-25 20:46:27 +00:00
|
|
|
|
2022-06-08 09:09:31 +01:00
|
|
|
`fish --command "{{echo 'fish is executed'}}"`
|
2018-01-02 18:00:12 +00:00
|
|
|
|
2022-06-08 09:09:31 +01:00
|
|
|
- Execute a specific script:
|
2018-01-02 18:00:12 +00:00
|
|
|
|
2021-04-14 15:07:21 +01:00
|
|
|
`fish {{path/to/script.fish}}`
|
2018-01-02 18:00:12 +00:00
|
|
|
|
2022-06-08 09:09:31 +01:00
|
|
|
- Check a specific script for syntax errors:
|
2018-01-02 18:00:12 +00:00
|
|
|
|
2021-04-14 15:07:21 +01:00
|
|
|
`fish --no-execute {{path/to/script.fish}}`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Execute specific commands from `stdin`:
|
2022-06-08 09:09:31 +01:00
|
|
|
|
|
|
|
`{{echo "echo 'fish is executed'"}} | fish`
|
|
|
|
|
2021-04-14 15:07:21 +01: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 18:00:12 +00:00
|
|
|
|
2021-11-25 20:46:27 +00:00
|
|
|
- Define and export an environmental variable that persists across shell restarts (builtin):
|
2018-01-02 18:00:12 +00:00
|
|
|
|
2021-11-25 20:46:27 +00:00
|
|
|
`set --universal --export {{variable_name}} {{variable_value}}`
|