From 51055a24871e7c15cc87359c5215fc3340ccc35d Mon Sep 17 00:00:00 2001 From: saibotk Date: Sun, 17 Apr 2022 21:00:39 +0200 Subject: [PATCH] Readd _has helper --- zsh/.zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 5b40702..8369bfb 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -14,6 +14,12 @@ fi zstyle ':znap:*' repos-dir ~/.znap source ~/.znap/znap/znap.zsh +# Helper Functions +# Returns whether the given command is executable or aliased. +_has() { + return $( whence $1 >/dev/null ) +} + # autocomplete settings zstyle ':autocomplete:tab:*' widget-style menu-select zstyle ':autocomplete:*' fzf-completion yes