Switch fasd distro #fishshell

This commit is contained in:
Colin Powell
2019-01-07 14:36:01 -05:00
parent 8383551ba7
commit 8f25c5e5ce
26 changed files with 60 additions and 37 deletions

View File

@ -1 +1 @@
complete -c a -a "(__fasd_print_completion -a)" -f -A
complete -c a -a "(__fasd_print_completion -a)" -f

View File

@ -1 +1 @@
complete -c d -a "(__fasd_print_completion -d)" -f -A
complete -c d -a "(__fasd_print_completion -d)" -f

View File

@ -1 +1 @@
complete -c f -a "(__fasd_print_completion -f)" -f -A
complete -c f -a "(__fasd_print_completion -f)" -f

View File

@ -1 +1,18 @@
complete -c fasd -a "(__fasd_print_completion)" -f -A
# suggest paths
complete -c fasd -a "(__fasd_print_completion)" -f
# suggest args
complete -c fasd -s s -d "List all paths and scores" -f
complete -c fasd -s l -d "List paths without scores" -f
complete -c fasd -s i -d "Interactive mode" -f
complete -c fasd -s e -a (echo subl atom) -d "Set command to execute on the result file" -f
complete -c fasd -s b -a (echo spotlight viminfo recently-used current) -d "Only use given backend" -f
complete -c fasd -s B -a (echo spotlight viminfo recently-used current) -d "Add additional backend" -f
complete -c fasd -s a -d "Match files and directories" -f
complete -c fasd -s d -d "Match directories only" -f
complete -c fasd -s f -d "Match files only" -f
complete -c fasd -s r -d "Match by rank only" -f
complete -c fasd -s t -d "Match by recent access only" -f
complete -c fasd -s R -d "Reverse listing order" -f
complete -c fasd -s h -d "Show a brief help message" -f
# complete -c fasd -s [0-9] "Select the nth entry"

View File

@ -1 +0,0 @@
complete -c fasd_cd -a "(__fasd_print_completion -d)" -f -A

View File

@ -1 +1 @@
complete -c s -a "(__fasd_print_completion)" -f -A
complete -c s -a "(__fasd_print_completion)" -f

View File

@ -1 +1 @@
complete -c sd -a "(__fasd_print_completion -d)" -f -A
complete -c sd -a "(__fasd_print_completion -d)" -f

View File

@ -1 +1 @@
complete -c sf -a "(__fasd_print_completion -f)" -f -A
complete -c sf -a "(__fasd_print_completion -f)" -f

View File

@ -1 +1 @@
complete -c z -a "(__fasd_print_completion -d)" -f -A
complete -c z -a "(__fasd_print_completion -d)" -f

View File

@ -1 +1 @@
complete -c zz -a "(__fasd_print_completion -d)" -f -A
complete -c zz -a "(__fasd_print_completion -d)" -f

View File

@ -1,6 +1,6 @@
function __fasd_run -e fish_preexec -d "fasd takes record of the directories changed into"
if test $argv[1] != "exit"
command fasd --proc (command fasd --sanitize "$argv") > "/dev/null" 2>&1 &
end
function __fasd_run -e fish_postexec -d "fasd takes record of the directories changed into"
set -lx RETVAL $status
if test $RETVAL -eq 0 # if there was no error
command fasd --proc (command fasd --sanitize (eval echo "$argv") | tr -s " " \n) > "/dev/null" 2>&1 &
end
end

View File

@ -1 +0,0 @@
fisher copy-user-key-bindings

View File

@ -5,5 +5,9 @@ set -q FZF_PREVIEW_FILE_CMD; or set -U FZF_PREVIEW_FILE_CMD "head -n 10"
set -q FZF_PREVIEW_DIR_CMD; or set -U FZF_PREVIEW_DIR_CMD "ls"
function fzf_uninstall -e fzf_uninstall
# Erase env vars and __fzf functions here.
set -l _vars (set | command grep -E "^FZF.*\$" | command awk '{print $1;}')
for var in $_vars
echo $var
eval (set -e $var)
end
end

View File

@ -37,5 +37,8 @@ if set -q FZF_COMPLETE
end
function fzf_key_bindings_uninstall -e fzf_key_bindings_uninstall
# Erase key bindings here.
set -l _bindings (bind -a | sed -En "s/(')?__fzf.*\$//p" | sed 's/bind/bind -e/')
for binding in $_bindings
eval $binding
end
end

View File

@ -14,6 +14,7 @@ SETUVAR Z_DATA_DIR:/Users/colinpowell/\x2elocal/share/z
SETUVAR Z_EXCLUDE:/Users/colinpowell
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d
SETUVAR __fish_init_3_x:\x1d
SETUVAR __tf_func:function\x20__tf_alias\x20\x2dd\x20\x22Correct\x20your\x20previous\x20console\x20command\x22\x3b\x20\x20set\x20\x2dl\x20fucked_up_command\x20\x24history\x5b1\x5d\x3b\x20\x20env\x20TF_SHELL\x3dfish\x20TF_ALIAS\x3d__tf_alias\x20PYTHONIOENCODING\x3dutf\x2d8\x20thefuck\x20\x24fucked_up_command\x20\x7c\x20read\x20\x2dl\x20unfucked_command\x3b\x20\x20if\x20\x5b\x20\x22\x24unfucked_command\x22\x20\x21\x3d\x20\x22\x22\x20\x5d\x3b\x20\x20\x20\x20eval\x20\x24unfucked_command\x3b\x20\x20\x20\x20builtin\x20history\x20delete\x20\x2d\x2dexact\x20\x2d\x2dcase\x2dsensitive\x20\x2d\x2d\x20\x24fucked_up_command\x3b\x20\x20\x20\x20builtin\x20history\x20merge\x20\x5e\x20/dev/null\x3b\x20\x20end\x3bend\x3b
SETUVAR __tf_vers:The\x20Fuck\x203\x2e28\x20using\x20Python\x203\x2e7\x2e1\x20and\x20Fish\x20Shell\x202\x2e7\x2e1
SETUVAR budspencer_colors:000000\x1e083743\x1e445659\x1efdf6e3\x1eb58900\x1ecb4b16\x1edc121f\x1eaf005f\x1e6c71c4\x1e268bd2\x1e2aa198\x1e859900

View File

@ -1,6 +1,6 @@
jethrokuan/z
jethrokuan/fzf
fishgretel/fasd
adityavm/fasd
2m/fish-gpg-tty
asdf-vm/asdf
edc/bass

View File

@ -1,5 +1,5 @@
# suggest paths for current args as completion
function __fasd_print_completion
set cmd (commandline -po)
test (count $cmd) -ge 2; and fasd $argv $cmd[2..-1] -l
end

View File

@ -1,3 +1,3 @@
function a -d "fasd match files and directories"
command fasd -a $argv
function a -d "Match files and directories"
fasd -a $argv
end

View File

@ -9,7 +9,7 @@ set -l asdf_data_dir (
set -l asdf_bin_dirs $asdf_dir/bin $asdf_dir/shims $asdf_data_dir/shims
for x in $asdf_bin_dirs
if begin not contains $x $PATH; and test -d $x; end
set -gx PATH $x $PATH
if begin not contains $x $fish_user_paths; and test -d $x; end
set -gx fish_user_paths $fish_user_paths $x
end
end

View File

@ -1,3 +1,3 @@
function d -d "fasd match directories only"
command fasd -d $argv
function d -d "Match directories only"
fasd -d $argv
end

View File

@ -1,3 +1,3 @@
function f -d "fasd match files only"
command fasd -f $argv
function f -d "Match files only"
fasd -f $argv
end

View File

@ -1,3 +1,3 @@
function s -d "fasd show, search, select"
command fasd -si $argv
function s -d "Interactively select from all"
fasd -is $argv
end

View File

@ -1,3 +1,3 @@
function sd -d "fasd interactive directory selection"
command fasd -sid $argv
function sd -d "Interactively select directory"
fasd -isd $argv
end

View File

@ -1,3 +1,3 @@
function sf -d "fasd interactive file selection"
command fasd -sif $argv
function sf -d "Interactively select file"
fasd -isf $argv
end

View File

@ -1,3 +1,3 @@
function z -d "fasd cd, same functionality as j in autojump"
function z -d "Change directory to first match"
fasd_cd -d $argv
end

View File

@ -1,3 +1,3 @@
function zz -d "fasd cd with interactive selection"
fasd_cd -di $argv
function zz -d "Change directory with interactive selection"
fasd_cd -id $argv
end