# Disable greeting set fish_greeting set -g fish_key_bindings fish_vi_key_bindings set -U grc_plugin_ignore_execs ls systemctl bind -M insert \cz 'fg ; commandline -f repaint' function ssht ssh -t "$argv" "tmux new-session -A -s 'ssh-$HOST'" end function cdt builtin cd (mktemp -d) builtin pwd end function sll --description "Recursively resolve a symbolic link" for path in $argv set -l seen_inodes while test -L $path set inode (stat -c %i $path) if contains $inode $seen_inodes echo "Infinite recursion detected" return 1 end set -a seen_inodes $inode ll -d $path || return 1 set previous_dir (path dirname $path) set path (readlink $path | path normalize) if not string match -q "/*" $path set path (path normalize "$previous_dir/$path") end end ll -d $path || return 1 end end function expand_equal_command type -P (string sub --start 2 $argv) end abbr -a expand_equal_command --position anywhere --regex "^=.+" --function expand_equal_command