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`
|
|
|
|
|
|
|
|
- Execute a command:
|
|
|
|
|
|
|
|
`fish --command "{{command}}"`
|
2018-01-02 18:00:12 +00:00
|
|
|
|
2021-04-14 15:07:21 +01:00
|
|
|
- Execute a 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
|
|
|
|
2021-04-14 15:07:21 +01:00
|
|
|
- Check a 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}}`
|
|
|
|
|
|
|
|
- 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}}`
|
2019-10-07 17:55:45 +01:00
|
|
|
|
2021-11-25 20:46:27 +00:00
|
|
|
- Print the version:
|
2019-10-07 17:55:45 +01:00
|
|
|
|
2021-11-25 20:46:27 +00:00
|
|
|
`fish --version`
|