fish
fish is a non-POSIX commplient shell which I find to be really good for day to day use.
Managing fish plugins
fisher - plugin manager
Miscellaneous tips
Directory variables
This makes it pretty easy to run commands regardless of the current working directory. Example, to search for all files with
__main__
in projects directory,Alt+Back
- to go back in directory history andAlt+Right
to forward.Alt+v
- to edit command with shell's default editor. This is looked up via the$EDITOR
environment variable.Alt+f
,Alt+b
- to go forward adn backward in currently editing command. These are Emacs readline keys which fish prompt support out of the box.
Useful functions
Run in directory
This is pretty useful to run a command in a different directory from the one you are currently working in. For example, I use this frequently to check the
git status
of the notes directory with -rd $Notes git status
, where$Notes
is a directory alias to the Notes directory. Since the subcommands run in a fish shell, you can use usual conviniences such a abbreviations and aliases. Thus above command can be shortened to,rd $Notes gs
in my configuration.Create directory and
cd
into it,Find out the ID of the running container for given search term
Usage example: To find out currently running Postgres instance -
container-id postgres
.
Last updated