zsh optimised

This commit is contained in:
js0ny 2025-11-06 08:31:07 +00:00
parent 6e0352c089
commit 59328ad384
9 changed files with 58 additions and 36 deletions

View file

@ -3,7 +3,7 @@
pkgs,
...
}: let
aliases = import ./aliases.nix {pkgs = pkgs;};
aliasCfg = import ./aliases.nix {pkgs = pkgs;};
in {
home.packages = with pkgs; [
zsh-fzf-tab
@ -16,19 +16,19 @@ in {
historySubstringSearch.enable = true;
enableCompletion = true;
dotDir = "${config.xdg.configHome}/zsh";
# shellAliases = aliases;
shellAliases = aliasCfg.aliases;
defaultKeymap = "emacs";
zsh-abbr = {
enable = true;
abbreviations = aliases;
};
# zsh-abbr = {
# enable = true;
# abbreviations = aliases;
# };
syntaxHighlighting = {
enable = true;
patterns = {
"rm -rf *" = "fg=blue,bold,bg=red";
};
styles = {
path = "fg=cyan";
path = "fg=cyan,underline";
};
highlighters = [
"main"
@ -38,11 +38,11 @@ in {
];
};
initContent = ''
${aliasCfg.posixFx}
# Options
# ==========
# ! This breaks the nixos-rebuild --flake .#something
# setopt INTERACTIVE_COMMENTS # Allow comments in interactive mode
setopt INTERACTIVE_COMMENTS # Allow comments in interactive mode
# Globbing
setopt EXTENDED_GLOB # Extended globbing