loading...

re: My Shell Aliases VIEW POST

FULL DISCUSSION
 

Directory navigation:

1='cd +1'
2='cd +2'
3='cd +3'
4='cd +4'
5='cd +5'
6='cd +6'
7='cd +7'
8='cd +8'
9='cd +9'
d='dirs -v'
Enter fullscreen mode Exit fullscreen mode

Global aliases (allows you do stuff like alias G <something> instead of alias | grep <something>):

C='|wc -l'
G='|grep'
H='|head'
L='|less'
S='|sort'
SL='|sort|less'
T='|tail'
Enter fullscreen mode Exit fullscreen mode

Package management:

brewc='brew cleanup'
brewu='brew update && brew upgrade'
bservl='brew services list'
bservr='brew services restart'
bservs='brew services start'
bservx='brew services stop'

nixU='nix-channel --update && nix-env -iA nixpkgs.nix'
nixc='nix-collect-garbage -d'
nixq='nix-env -qaP'
nixu='nix-env -u'
Enter fullscreen mode Exit fullscreen mode

Replacing cat and ls with Rust alternatives:

cat='bat --paging=never --style=plain'
l='exa -1a'
la='ls -a'
ll='exa -lh --git'
ls=exa
lt='exa -lT --git'
Enter fullscreen mode Exit fullscreen mode

Using Kitty plugins for being able to display image files in the terminal and having a nice diff experience:

icat='kitty +kitten icat'
kdiff='kitty +kitten diff'
Enter fullscreen mode Exit fullscreen mode

A few random ones:

g=git
r='bundle exec rake'
serve='python -m http.server'
vim=nvim
Enter fullscreen mode Exit fullscreen mode
 

I use g for git as well. 🔥 I updated the post. I must have missed that line as I was only copying part of my .zshrc file. 🙃

 

I got them from the command line: alias|pbcopy, then just edited in the comments.

Code of Conduct Report abuse