From 1dfafa3fb040971711ec6b155671bd0f077f5665 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 22 Apr 2022 17:41:44 +0200 Subject: [PATCH] modules/shell-config: magic command-not-found using comma --- modules/shell-config/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/shell-config/default.nix b/modules/shell-config/default.nix index d510ff3..8432777 100644 --- a/modules/shell-config/default.nix +++ b/modules/shell-config/default.nix @@ -10,6 +10,11 @@ let ] ++ [ "source ${pkgs.fzf}/share/fzf/key-bindings.zsh" "ZSH_HIGHLIGHT_DIRS_BLACKLIST=(/* /ipfs /ipns)" + '' + command_not_found_handler() { + ${pkgs.comma}/bin/comma "$@" + } + '' ]; in { environment.shellAliases = { @@ -28,6 +33,7 @@ in { manix-view = ''manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --ansi --preview="manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain"''; }; programs = { + command-not-found.enable = false; zsh = { enable = true; histFile = "$HOME/.cache/zsh_history";