add homessh alias, config reload message
This commit is contained in:
parent
d629598067
commit
52efbf92b7
27
config.fish
27
config.fish
|
@ -1,5 +1,14 @@
|
||||||
set fish_greeting ""
|
set fish_greeting ""
|
||||||
|
|
||||||
|
function y
|
||||||
|
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||||
|
yazi $argv --cwd-file="$tmp"
|
||||||
|
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
|
builtin cd -- "$cwd"
|
||||||
|
end
|
||||||
|
rm -f -- "$tmp"
|
||||||
|
end
|
||||||
|
|
||||||
function filesize
|
function filesize
|
||||||
for file in $argv
|
for file in $argv
|
||||||
if [ -f "$file" ]
|
if [ -f "$file" ]
|
||||||
|
@ -20,10 +29,6 @@ function _fetch
|
||||||
end
|
end
|
||||||
|
|
||||||
function _set_env
|
function _set_env
|
||||||
if [ "$TERM" = "foot" ] || [ "$TERM" = "xterm-kitty" ]
|
|
||||||
which ssh > /dev/null 2>&1 && alias ssh="TERM=xterm-256color $(which ssh)"
|
|
||||||
which gg > /dev/null 2>&1 && alias gg="TERM=xterm-256color $(which gg)"
|
|
||||||
end
|
|
||||||
set -gx VIRTUAL_ENV_DISABLE_PROMPT
|
set -gx VIRTUAL_ENV_DISABLE_PROMPT
|
||||||
set -gx PF_INFO "ascii title os host kernel uptime memory de"
|
set -gx PF_INFO "ascii title os host kernel uptime memory de"
|
||||||
set -gx FZF_DEFAULT_OPTS "\
|
set -gx FZF_DEFAULT_OPTS "\
|
||||||
|
@ -36,6 +41,13 @@ function _set_env
|
||||||
end
|
end
|
||||||
|
|
||||||
function _set_aliases
|
function _set_aliases
|
||||||
|
if [ "$TERM" = "foot" ] || [ "$TERM" = "xterm-kitty" ]
|
||||||
|
if which ssh > /dev/null 2>&1
|
||||||
|
alias ssh="TERM=xterm-256color $(which ssh)"
|
||||||
|
alias homessh="ssh -p 48001 tx0.su"
|
||||||
|
end
|
||||||
|
which gg > /dev/null 2>&1 && alias gg="TERM=xterm-256color $(which gg)"
|
||||||
|
end
|
||||||
if which eza > /dev/null 2>&1
|
if which eza > /dev/null 2>&1
|
||||||
alias ls="eza --icons=auto"
|
alias ls="eza --icons=auto"
|
||||||
else if which exa > /dev/null 2>&1
|
else if which exa > /dev/null 2>&1
|
||||||
|
@ -85,11 +97,14 @@ if status is-interactive
|
||||||
zoxide init --cmd cd fish | source
|
zoxide init --cmd cd fish | source
|
||||||
end
|
end
|
||||||
|
|
||||||
if [ "$reload" = "" ]
|
if not set -q _fish_reloaded
|
||||||
_fetch
|
_fetch
|
||||||
|
else
|
||||||
|
printf "%s\n" "config reloaded"
|
||||||
|
fish_prompt
|
||||||
end
|
end
|
||||||
|
|
||||||
set reload "done"
|
set _fish_reloaded
|
||||||
_set_aliases
|
_set_aliases
|
||||||
end
|
end
|
||||||
_set_env
|
_set_env
|
||||||
|
|
Loading…
Reference in a new issue