diff options
author | aszlig <aszlig@nix.build> | 2019-09-22 15:20:52 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2019-09-22 15:20:52 +0200 |
commit | 972808b6806dd6d8c1a0ccc7caf76e1ba36fc36d (patch) | |
tree | 682926347c87545d4e38b90ce80b5ae32f72c00c /modules/user | |
parent | 4ae45fb74f2009b14bb53d23914730cf20ea5d7b (diff) |
modules/zsh: Fix options and clean up a bit
Since a while ago[1], the setting of ZSH options is now done after interactiveShellInit, so using unsetopt SHARE_HISTORY doesn't work anymore because it is set *afterwards*. Instead of setting these options, we now use the setOptions option instead and override it with exactly the options I want to be set. Additionally, compinit is also no longer necessary, because it is done by default and invoking it on our own is just redundant. [1]: https://github.com/NixOS/nixpkgs/pull/58012 Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'modules/user')
-rw-r--r-- | modules/user/aszlig/programs/zsh/default.nix | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/modules/user/aszlig/programs/zsh/default.nix b/modules/user/aszlig/programs/zsh/default.nix index fb3b9a49..e66be125 100644 --- a/modules/user/aszlig/programs/zsh/default.nix +++ b/modules/user/aszlig/programs/zsh/default.nix @@ -41,25 +41,26 @@ in { programs.zsh.shellAliases.t = "task"; programs.zsh.shellAliases.p = "gopass"; + programs.zsh.setOptions = lib.mkForce [ + "auto_cd" + "auto_pushd" + "beep" + "correct" + "dvorak" + "extended_glob" + "extended_history" + "hist_fcntl_lock" + "hist_ignore_dups" + "hist_no_store" + "hist_reduce_blanks" + "interactive_comments" + ]; + programs.zsh.interactiveShellInit = mkAfter '' export HISTFILE=~/.histfile export HISTSIZE=100000 export SAVEHIST=100000 - unsetopt SHARE_HISTORY - - setopt extendedglob - setopt extendedhistory - setopt globcomplete - setopt histnostore - setopt histreduceblanks - setopt correct - setopt dvorak - setopt interactivecomments - setopt autopushd - setopt autocd - setopt beep - bindkey -v if [[ "$TERM" = xterm ]]; then bindkey -v '\e[H' vi-beginning-of-line @@ -110,9 +111,6 @@ in { zstyle ':completion:*' use-compctl false zstyle ':completion:*' verbose true - autoload -Uz compinit - compinit - autoload -Uz zmv ''; |