From 1721486119b02d8fa27b7c30f747f8d247f8d021 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 18 Oct 2024 19:35:54 +0200 Subject: refactor(modules/legacy/conf/zsh): Modernize module --- modules/home.legacy/conf/zsh/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/home.legacy/conf/zsh/default.nix b/modules/home.legacy/conf/zsh/default.nix index cb1a565f..2af7cdbe 100644 --- a/modules/home.legacy/conf/zsh/default.nix +++ b/modules/home.legacy/conf/zsh/default.nix @@ -6,10 +6,6 @@ system, ... }: { - # TODO: ADD THIS ADDON - # next one only works if your alias is only a command, e.g. if you `alias='cat some_file.txt &2> /dev/null'`, running `cat some_file.txt` won't trigger it. - # TODO: find something better for this use case - # zsh-you-should-use # ZSH plugin that reminds you to use existing aliases for commands you just typed home.sessionPath = []; programs.zsh = { enable = true; @@ -19,13 +15,15 @@ autocd = true; + # Must be relative to the users home directory (for whatever reason) + # Thus no `${config.xdg.configHome}` dotDir = ".config/zsh"; history = { extended = true; ignoreDups = false; expireDuplicatesFirst = false; - ignoreSpace = false; # TODO: I might change that + ignoreSpace = false; path = "${config.xdg.dataHome}/zsh/history"; save = 9000000; # number of lines to save @@ -39,9 +37,9 @@ }; loginExtra = - "" + "setopt " # The extra space is important + lib.concatStringsSep "\nsetopt " [ - "setopt AUTO_CD" # This is needed as first item + "AUTO_CD" "AUTO_PUSHD" "CHASE_DOTS" -- cgit 1.4.1