modules/shell-config: magic command-not-found using comma

This commit is contained in:
Max Headroom 2022-04-22 17:41:44 +02:00
parent ccdf8f8b79
commit 1dfafa3fb0

View file

@ -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";