How I configure my terminal.
This is how I setup my terminal. It currently supports bash and zsh on Linux and Cygwin.
All you need is bash, git, and python 2 or 3 (for the installation script). I assume you have a decent .bashrc that colorizes your command line which you wish to extend without modifying too much.
Install on bash with:
$ cd ~
$ git clone https://github.com/vguarnaccia/.terminalrc.git
$ python ~/.terminalrc/installer.py --install bashrc
$ source ~/.bashrc
Uninstall bash config with:
$ python ~/.terminalrc/installer.py --remove bashrc
And then delete .terminalrc/
For zsh, follow the instructions above but replace bashrc with zshrc.
If you need any local configurations, you can add them to ~/.terminalrc/local
. This way they are read when using bash or zsh.
I’ve tested it on Ubuntu, Arch and Cygwin. It should also work on Mac, where it installs the script on .bash_profile
instead of .bashrc
.
extract
command which will try to decompress various archive types.l
: Horizontally list content (ls -CF
).ll
: Vertically list content (ls -AhlF
).cdl
: Change directory and list contents.mkcd
: Make directory and enter it.ls
with exa. See the example local file for aliases.ls
and cd
everywhere when trying to understand a directory, use the tree
command or exa
.cd
. find
, xargs
, grep
combos. locate
is superior to find
if the file you are looking for is a least a day old.less
instead of cat, as I do, consider install firstBecause git commands are too long to type fully. If you are doing any complicated git operations, it is worth using a GUI. I prefer GitKracken at the moment. It’s currently freemium.
gs
: git status
ga
: git add
gd
: git diff
gdc
: git diff --cached
, surprisingly helpful.grm
: git rm
grc
: git rm --cached
gc
: git commit
gl
: like git log
but much prettier.gpl
: git pull
gpu
: git push
gbr
: git branch -vv
— verbose branchinggcache
: extend credentials timeout to 1 hour (for gpu
/gpl
). Useful for when you don’t has ssh setup.