fish: which function

This commit is contained in:
Charles Gould 2020-07-11 22:13:54 -04:00
parent 918c0c33db
commit ff9cc5976f
2 changed files with 3 additions and 6 deletions

View File

@ -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)

View File

@ -0,0 +1,3 @@
function which --wraps='type --all --short' --description 'alias which=type --all --short'
type --all --short $argv
end