From ff9cc5976f371e880bd7c8bd01313a651e96cb13 Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Sat, 11 Jul 2020 22:13:54 -0400 Subject: [PATCH] fish: which function --- fish/config.fish | 6 ------ fish/functions/which.fish | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 fish/functions/which.fish diff --git a/fish/config.fish b/fish/config.fish index 0f49a57..0b17075 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -16,12 +16,6 @@ set -gx FZF_CTRL_R_OPTS "--preview 'echo {}' --preview-window down:3:hidden:wrap set -gx FZF_ALT_C_COMMAND "fd --type=directory --follow" set -gx FZF_ALT_C_OPTS "--preview 'tree -CL 1 {}'" -# Aliases -alias which='type --all --short' -function ..; cd ..; end -function ...; cd ../..; end -function ....; cd ../../..; end - # Nix package manager if test -f ~/.nix-profile/etc/profile.d/nix.sh for line in (bash -c 'source $0; for name in "${!NIX_@}"; do printf "%s=%s\n" "$name" "${!name}"; done' ~/.nix-profile/etc/profile.d/nix.sh) diff --git a/fish/functions/which.fish b/fish/functions/which.fish new file mode 100644 index 0000000..4a7d636 --- /dev/null +++ b/fish/functions/which.fish @@ -0,0 +1,3 @@ +function which --wraps='type --all --short' --description 'alias which=type --all --short' + type --all --short $argv +end