From dc8475f7bb4fb6f61fdcc78abcdf8ac222ef7ddc Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 17 Aug 2022 22:02:56 +0300 Subject: [PATCH] Enable ubuntu command not found handler --- home/.config/zsh/01-env.zsh | 5 ----- home/.config/zsh/03-aliases.zsh | 8 ++++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/home/.config/zsh/01-env.zsh b/home/.config/zsh/01-env.zsh index 18aa0e2..b85aece 100644 --- a/home/.config/zsh/01-env.zsh +++ b/home/.config/zsh/01-env.zsh @@ -73,8 +73,3 @@ fi # Disable dotdrop submodule auto update export DOTDROP_AUTOUPDATE=no - -{%@@ if os == "arch" @@%} -# Enable pkgfile command not found handler -source /usr/share/doc/pkgfile/command-not-found.zsh -{%@@ endif @@%} diff --git a/home/.config/zsh/03-aliases.zsh b/home/.config/zsh/03-aliases.zsh index 846323f..e588df8 100644 --- a/home/.config/zsh/03-aliases.zsh +++ b/home/.config/zsh/03-aliases.zsh @@ -12,9 +12,13 @@ forgit_revert_commit=fgrc # Modern replacement for ls alias ls='exa' -{%@@ if os == "termux" @@%} +# Enable command not found handler +{%@@ if os == "arch" @@%} +source /usr/share/doc/pkgfile/command-not-found.zsh +{%@@ elif os == "ubuntu" @@%} +source /etc/zsh_command_not_found +{%@@ elif os == "termux" @@%} function command_not_found_handler { - printf 'zsh: command not found: %s\n' "$1" $PREFIX/libexec/termux/command-not-found $1 } {%@@ endif @@%}