From 61bd1a1395638a15f712db893f500479cd948849 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 27 May 2021 18:57:54 +0200 Subject: zsh: expand aliases after sudo --- common/commandline/zsh.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/commandline/zsh.nix b/common/commandline/zsh.nix index 28899b1..b21c2c0 100644 --- a/common/commandline/zsh.nix +++ b/common/commandline/zsh.nix @@ -10,8 +10,7 @@ in programs.zsh = { enable = true; - interactiveShellInit = with lib; - '' + interactiveShellInit = with lib; '' source "${pkgs.grml-zsh-config}/etc/zsh/zshrc" is4 && xsource "${pkgs.grml-zsh-config}/etc/zsh/keephack" @@ -43,10 +42,14 @@ in shellAliases = { e = "\${(z)EDITOR}"; + # Space at the end makes Zsh expand aliases after "sudo" + sudo = "sudo "; }; setOptions = [ - "HIST_IGNORE_DUPS" "SHARE_HISTORY" "HIST_FCNTL_LOCK" + "HIST_IGNORE_DUPS" + "SHARE_HISTORY" + "HIST_FCNTL_LOCK" "NO_CLOBBER" "NO_CASE_GLOB" ]; -- cgit v1.2.3