about summary refs log tree commit diff stats
path: root/nix-conf/home/includes
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2023-01-12 12:12:53 +0000
committerDavid Morgan <djm_uk@protonmail.com>2023-01-12 12:12:53 +0000
commite244cf50be5ef02d988889818ae283f4fe6c944e (patch)
tree847fb6ba5a859f187960323574c16e1a5eda4081 /nix-conf/home/includes
parent1a38ff654ac1a42bc6eb70b8af5f297f2e62cc42 (diff)
downloaddotfiles-e244cf50be5ef02d988889818ae283f4fe6c944e.tar.gz
Add checkout-pr function
Diffstat (limited to 'nix-conf/home/includes')
-rw-r--r--nix-conf/home/includes/zsh.nix5
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
a> 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190