:PROPERTIES: :ID: af92f7a3-705c-491e-955e-2f04206da220 :END: #+title: fish #+filetags: :basics:system:linux: fish is the *friendly interactive shell*. A [[id:b6d24dd6-285f-4c03-883c-dc77b78c652a][shell]] like bash that mimmicks a [[id:d71414fc-349c-4763-a703-9f7092fc90d6][command-line]] and is able to interact with [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Linux]]. Fish is highly customizable. To Customize the fish shell you have to change its configuration at [[~/.config/fish/config.fish]] or via the shell command ~fishconf~. for a shell to work in a [[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]] system it needs a [[id:5ddb50eb-4257-44cb-9193-1606b348e886][terminal emulator]] to run in. One of those emulated [[id:4c3c3777-af52-4cde-8d9b-f356701b94c9][terminals]] is [[id:b65b3f3a-e0a3-49ca-9005-5a1055c07cdf][kitty]]. Fish has "search as you type" automatic suggestions based on history and current directory. This is essentially like Bash's ~Ctrl+R~ history search, but because it is always on instead of being a separate mode, the user gets continuous feedback while writing the command line, and can select suggestions with the arrow keys, or as in Bash, press Tab ↹ for a tab completion instead. Tab-completion is feature-rich and has expanding file paths (with wildcards and brace expansion), variables, and many command specific completions. Command-specific completions, including options with descriptions, can to some extent be generated from the commands' man pages. Fish prefers features as commands rather than syntax. This makes features discoverable in terms of commands with options and help texts. Functions can also carry a human readable description. A special help command gives access to all the fish documentation in the user's web browser. * Universal Variables Fish has a feature known as universal variables, which allow a user to permanently assign a value to a variable across all the user's running fish shells. The variable value is remembered across logouts and reboots, and updates are immediately propagated to all running shells. #+begin_src bash # This will make emacs the default text editor. The '--universal' (or '-U') tells fish to # make this a universal variable. set --universal EDITOR emacs # This command will make the current working directory part of the fish # prompt turn blue on all running fish instances. set --universal fish_color_cwd blue #+end_src