From b3cd39d9b6502da310d214f1a5a938a44e131b99 Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Fri, 26 Nov 2021 06:46:27 +1000 Subject: [PATCH] fish: update page (#7415) * fish tldr clean-up: - short options preferred over long ones - page made more consistent with elvish page (check my PR) - commands reordered: interactive commands, non-interactive commands - set command example removed because it is example of Fish language but not of fish command * Update md to be consistent with #7416 issue: * Simplify version print command description * Use long options * --no-execute change: it is assumed that script is not executed by default after syntax check * Return set -Ux example * set builtin description fix --- pages/common/fish.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pages/common/fish.md b/pages/common/fish.md index 7ed43b3873..e95f64b6b6 100644 --- a/pages/common/fish.md +++ b/pages/common/fish.md @@ -7,9 +7,13 @@ `fish` -- Execute a command and then exit: +- Start an interactive shell session without loading startup configs: -`fish -c "{{command}}"` +`fish --no-config` + +- Execute a command: + +`fish --command "{{command}}"` - Execute a script: @@ -23,10 +27,10 @@ `fish --private` -- Display version information and exit: +- Define and export an environmental variable that persists across shell restarts (builtin): + +`set --universal --export {{variable_name}} {{variable_value}}` + +- Print the version: `fish --version` - -- Set and export environmental variables that persist across shell restarts (from within the shell only): - -`set -Ux {{variable_name}} {{variable_value}}`