summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2019-10-24 00:02:55 +0200
committerAlan Pearce2019-10-24 00:02:55 +0200
commit4c8a1ba2141f0e22ad4d294b9058869628ff4fc1 (patch)
tree3a640c26388e539e28d15d801d3789340f82ccc9 /user
parentecd0980872ec23624a5871df7f86c6a9adad66fe (diff)
downloadnixfiles-4c8a1ba2141f0e22ad4d294b9058869628ff4fc1.tar.lz
nixfiles-4c8a1ba2141f0e22ad4d294b9058869628ff4fc1.tar.zst
nixfiles-4c8a1ba2141f0e22ad4d294b9058869628ff4fc1.zip
Add aliases for new git switch/restore commands (v2.23)
Diffstat (limited to 'user')
-rw-r--r--user/settings/git.nix2
-rw-r--r--user/settings/zsh.nix3
2 files changed, 4 insertions, 1 deletions
diff --git a/user/settings/git.nix b/user/settings/git.nix
index 503b9e3f..18a40644 100644
--- a/user/settings/git.nix
+++ b/user/settings/git.nix
@@ -60,6 +60,8 @@
       ci = "commit";
       br = "branch";
       co = "checkout";
+      sw = "switch";
+      rs = "restore";
       lasttag = "!sh -c 'git tag --sort=version:refname | grep \"^v\\\\?[0-9]\" | tail -n1'";
       pending = "!sh -c 'git log --oneline --grep=\"#\" ...$(git lasttag)'";
       lg = "log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%an> %Cred%d%Creset'";
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
index 79384634..7a032b37 100644
--- a/user/settings/zsh.nix
+++ b/user/settings/zsh.nix
@@ -211,7 +211,8 @@ in
       gsh = "git show";
       gsm = "git submodule";
       gci = "git commit";
-      gco = "git checkout";
+      gx = "git restore";
+      gb = "git switch";
       gbr = "git br";
       gbrc = "git checkout -b";
       gbrd = "git branch --delete";