diff options
author | David Morgan <djm_uk@protonmail.com> | 2023-01-12 12:12:53 +0000 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2023-01-12 12:12:53 +0000 |
commit | e244cf50be5ef02d988889818ae283f4fe6c944e (patch) | |
tree | 847fb6ba5a859f187960323574c16e1a5eda4081 /nix-conf/home/includes | |
parent | 1a38ff654ac1a42bc6eb70b8af5f297f2e62cc42 (diff) | |
download | dotfiles-e244cf50be5ef02d988889818ae283f4fe6c944e.tar.gz |
Add checkout-pr function
Diffstat (limited to 'nix-conf/home/includes')
-rw-r--r-- | nix-conf/home/includes/zsh.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nix-conf/home/includes/zsh.nix b/nix-conf/home/includes/zsh.nix index 93fdb2d..7a01868 100644 --- a/nix-conf/home/includes/zsh.nix +++ b/nix-conf/home/includes/zsh.nix @@ -192,6 +192,11 @@ df -h } + function checkout-pr () { + git fetch ''${2:-upstream} pull/''${1}/head:pr-''${1} + git switch pr-''${1} + } + [[ ! -f ~/.zsh.local ]] || source ~/.zsh.local [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh |