From 0280981e3276f3ddfdf3b9cecd4d036148963299 Mon Sep 17 00:00:00 2001 From: cswimr Date: Thu, 23 Jan 2025 16:08:42 -0600 Subject: [PATCH] automatically pull from git in `upd` alias --- config/xonsh/aliases.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/xonsh/aliases.py b/config/xonsh/aliases.py index 1c41299..40d4bfd 100644 --- a/config/xonsh/aliases.py +++ b/config/xonsh/aliases.py @@ -55,6 +55,11 @@ def _upd(args: list): "Visual Studio Code user settings": ".config/Code/User/settings.json.bak", "fontconfig": ".config/fontconfig/conf.d/10-hm-fonts.conf.bak" } + if not "--no-pull" in args: + print(f"{c.BLUE}Pulling {c.YELLOW}NixOS{c.BLUE} configuration from remote{c.END}") + run["git", "pull", cwd=path] + else: + args.remove("--no-pull") if "--rewrite-hardware-configuration" in args: args.remove("--rewrite-hardware-configuration") print(f"{c.BLUE}Updating {c.YELLOW}NixOS{c.BLUE} hardware configuration file for {c.YELLOW}{gethostname()}{c.BLUE}{c.END}")