diff options
author | Minijackson <minijackson@riseup.net> | 2021-05-27 18:57:54 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2021-05-27 18:57:54 +0200 |
commit | 61bd1a1395638a15f712db893f500479cd948849 (patch) | |
tree | ab6d20b316b39ffc641b0a9155a55384daaf65e9 /common | |
parent | 099f70506acb2da681d5e5984b70e12761149427 (diff) | |
download | nixos-config-reborn-61bd1a1395638a15f712db893f500479cd948849.tar.gz nixos-config-reborn-61bd1a1395638a15f712db893f500479cd948849.zip |
zsh: expand aliases after sudo
Diffstat (limited to 'common')
-rw-r--r-- | common/commandline/zsh.nix | 9 |
1 files changed, 6 insertions, 3 deletions
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 | |||
10 | programs.zsh = { | 10 | programs.zsh = { |
11 | enable = true; | 11 | enable = true; |
12 | 12 | ||
13 | interactiveShellInit = with lib; | 13 | interactiveShellInit = with lib; '' |
14 | '' | ||
15 | source "${pkgs.grml-zsh-config}/etc/zsh/zshrc" | 14 | source "${pkgs.grml-zsh-config}/etc/zsh/zshrc" |
16 | is4 && xsource "${pkgs.grml-zsh-config}/etc/zsh/keephack" | 15 | is4 && xsource "${pkgs.grml-zsh-config}/etc/zsh/keephack" |
17 | 16 | ||
@@ -43,10 +42,14 @@ in | |||
43 | 42 | ||
44 | shellAliases = { | 43 | shellAliases = { |
45 | e = "\${(z)EDITOR}"; | 44 | e = "\${(z)EDITOR}"; |
45 | # Space at the end makes Zsh expand aliases after "sudo" | ||
46 | sudo = "sudo "; | ||
46 | }; | 47 | }; |
47 | 48 | ||
48 | setOptions = [ | 49 | setOptions = [ |
49 | "HIST_IGNORE_DUPS" "SHARE_HISTORY" "HIST_FCNTL_LOCK" | 50 | "HIST_IGNORE_DUPS" |
51 | "SHARE_HISTORY" | ||
52 | "HIST_FCNTL_LOCK" | ||
50 | "NO_CLOBBER" | 53 | "NO_CLOBBER" |
51 | "NO_CASE_GLOB" | 54 | "NO_CASE_GLOB" |
52 | ]; | 55 | ]; |