From 8050aa5304d60e2d5b98c6d6ab96d2891749d175 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Sun, 2 Jul 2023 14:24:15 +0200 Subject: [PATCH] zsh: git branchless completion --- .zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.zshrc b/.zshrc index 55aa782..138d28c 100644 --- a/.zshrc +++ b/.zshrc @@ -119,6 +119,7 @@ export BAT_PAGER="less -r" alias c='cut -c-${COLUMNS}' alias e='tmux-edit-helper' alias dotgit='git --work-tree $HOME --git-dir $HOME/.dot_git' +alias git='git-branchless wrap --' alias l='bat --wrap=never --pager="less -S"' alias ls=exa alias tail='tail -n $LINES' @@ -236,6 +237,11 @@ alias kubectl='grc kubectl' # curl -sLo "${fpath[1]}/_bazel" https://raw.githubusercontent.com/bazelbuild/bazel/master/scripts/zsh_completion/_bazel #fi +## git-branchless +if [ ! -f "${fpath[1]}/_git_branchless" ]; then + curl -sLo "${fpath[1]}/_git_branchless" https://gist.githubusercontent.com/minijackson/68effb0e6c7d8333e20f07da20076c28/raw/5469ffa1c6adc245adb82316f1013937c5148da7/_git-branchless +fi + ## sapling if [ ! -f "${fpath[1]}/_sl" ]; then # See: https://github.com/facebook/sapling/pull/369