10 ms·
Since I'm working in git repos the majority of the time, I type these hundreds of times per day: alias s="git status" alias d="git diff" I prefer look
by exogen 8y ago
Since I'm working in git repos the majority of the time, I type these hundreds of times per day:
alias s="git status"
alias d="git diff"
I prefer looking at this stuff in a terminal rather than an IDE. Reducing them to a single character just feels so good. Note: not a git alias like "git s", literally just the single character "s" in Bash itself.
And coming in third:
alias ..="cd .."
- yuchi 8y agoI have the same exact aliases but they check for a Git or SVN repo and then use the right tool accordingly. I also have `..`, but also `...` which maps to `cd ../..`
- joseph8th 8y agoI also have '..' and '...', AND '....' heheh. I use that last one a lot
- chrismorgan 8y agoalias ..="cd .." If you use zsh, typing a directory name changes to it automatically. It’s almost always a very delightful thing.
- vittore 8y agoadd z to it!
- morenoh149 8y agoI like alias h="cd -" to go to the last directory I was in. Inspired by how you move the cursor to the left in vim.
- rossy 8y agoBash has this as well set autocd
- vfulco2 8y agoside note: i started to get into zsh and then serverless. zsh was balking at finding node.js/yarn stuff and running commands. I had to revert back to bash
- yboris 8y agoYou should try Diff2HTML - https://diff2html.xyz/ https://diff2html.xyz/ install the cli with `npm install -g diff2html-cli` alias diff='diff2html -s side'
- edavis 8y agoOne/two char git aliases took me to the next level: alias ci='git commit' alias co='git checkout' alias d='git diff' alias dc='git diff --cached' alias l='git log --oneline --graph --all --decorate' alias ru='git remote update' alias s='git status'
- shabble 8y agoI have one that takes an optional numeric arg for the number of times to repeat. Surprisingly useful, but I still keep meaning to get round to making a nicer interactive one with fzf or something. $ alias .. ..=up $ type -f up up () { local tmp_path='' for i in $(seq 1 ${1:-1}) do tmp_path+='../' done cd "$tmp_path" }