diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2023-09-10 18:42:20 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2023-09-10 18:42:20 +0100 |
| commit | 76dee9bafe2aeb2f47fe30ee99defebb27ecd6c0 (patch) | |
| tree | efbb633d8afc1fcea8a50f813328d79a99388e5c | |
| parent | 98d5c79eaae6f69019fcb4c155353cacf71a5b59 (diff) | |
git: Add ‘root’ alias to find top-level directory
| -rw-r--r-- | git/config | 15 | ||||
| -rw-r--r-- | zsh/rc | 1 |
2 files changed, 9 insertions, 7 deletions
@@ -1,11 +1,12 @@ [alias] - br = branch - co = checkout - di = diff - dis = diff --staged - fa = fetch --all --prune - gi = grep -i - st = status + br = branch + co = checkout + di = diff + dis = diff --staged + fa = fetch --all --prune + gi = grep -i + root = rev-parse --show-toplevel + st = status [branch] autoSetupRebase = always @@ -26,6 +26,7 @@ SAVEHIST=${HISTSIZE} WORDCHARS=${WORDCHARS/\//} alias bc='bc -lq' +alias cdr='cd $(git root)' alias cp='cp -i' alias ddig='dig +noall +answer' alias dfl='df -l' |
