Basis
Fish
Fish generally works like other shells, like Bash or Zsh. A few important differences can be found at https://fishshell.com/docs/current/tutorial.html by searching for the magic phrase "unlike other shells".
Config
fish_configOpen web interface to config fish.
fish_add_path /my/path/to/addAdd new path to PATH.
Alias
alias --save k="kubectl"Create an alias (
--save
make permanent).
Variables
Set Variable
set MY_VAR myValueSet variable.
-xExport the variable (make it an environment variable, available to child processes).
-gGlobal variable (available to all function in the same shell).
-USet "Universal" variable (available all fish instances and persist across restarts).
Structures
While
while read line; echo $line; end < myFile.txtOne liner version of while loop to read file.