Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fish shell #1758

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update code samples:
- prefer "echo" command to "set $my_variable"
  • Loading branch information
EmilySeville7cfg authored and EmilySeville7cfg committed Dec 19, 2021
commit 4cff1a8efa6965af6b01b9eeccd6451dde313339
10 changes: 5 additions & 5 deletions fish-shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ set --erase my_variable
Slice the variable:

```fish
set my_variable $another_variable[1..10]
set my_variable $another_variable[2..]
set my_variable $another_variable[..-2]
echo $my_variable[1..10]
echo $my_variable[2..]
echo $my_variable[..-2]
```

## Arithmetic
Expand Down Expand Up @@ -222,15 +222,15 @@ my_command | another_command
Replace the command invocation with it's stdout output:

```fish
set my_variable (math $my_variable + 1)
echo (math $my_variable + 1)
```

### Process substitution

Replace the command invocation with a temporary file name with a command stdout output:

```bash
math $my_variable + 1 | psub
echo (math $my_variable + 1 | psub)
```

## Functions
Expand Down