...
 
Commits (2)
......@@ -53,7 +53,7 @@ if test "$os" = "Darwin"
set -x ITERM_PROFILE "Default"
set -x BAT_THEME "OneHalfLight"
set -x HIGHLIGHT_STYLE "base16/tomorrow"
set -u FZF_DEFAULT_OPTS
set -x FZF_DEFAULT_OPTS '--color=light'
set -U fish_color_autosuggestion 8e908c
set -U fish_color_command 8959a8
set -U fish_color_comment eab700
......@@ -67,7 +67,7 @@ if test "$os" = "Darwin"
set -x ITERM_PROFILE "Dark"
set -x BAT_THEME "OneHalfDark"
set -x HIGHLIGHT_STYLE "base16/tomorrow-night"
set -x FZF_DEFAULT_OPTS '--color=bg+:#635196,fg:#b4b4b9,pointer:#ffb07b,marker:#ff761a,prompt:#34bfa4,info:#ffd392'
set -x FZF_DEFAULT_OPTS '--color=dark'
set -U fish_color_autosuggestion 969896
set -U fish_color_command c397d8
set -U fish_color_comment e7c547
......
function fssh --description 'Fuzzy-search powered SSH'
set ansible_path ~/Sources/ansible/samedi
set fssh_cache ~/.ssh/fssh.cache
if not test -s $fssh_cache
cd $ansible_path
ansible-inventory --list | jq '.[] | .hosts? | .[]? ' | sort | uniq > $fssh_cache
prevd
end
# if no arguments passed, connect
if not count $argv > /dev/null
set argv connect
end
# print & switch all the things!
switch $argv
case cc clear-cache
rm $fssh_cache
echo "Cache cleared!"
case uc update-cache
cd $ansible_path
ansible-inventory --list | jq '.[] | .hosts? | .[]? ' | sort | uniq > $fssh_cache
prevd
case c connect
set -l target (cat $fssh_cache | gsed 's/"//g' | fzf --no-hscroll --ansi +m --prompt="ssh > ")
if not test -s $target
ssh $target
end
case '*'
echo Wrong usage you bastardo\!
end
end