fish cleanup

This commit is contained in:
Anton Volnuhin 2023-05-09 02:21:42 +03:00
parent 936a324282
commit 778e80e09f

View File

@ -1,4 +1,4 @@
set -gx PATH "/usr/local/opt/coreutils/libexec/gnubin" $PATH
set -gx PATH /usr/local/opt/coreutils/libexec/gnubin $PATH
set -gx PATH /usr/local/bin $PATH
set fish_color_valid_path
@ -6,42 +6,14 @@ set fish_color_valid_path
# Commands to run in interactive sessions can go here
if status is-interactive
#source /usr/local/etc/grc.fish
atuin init fish --disable-up-arrow | source
fish_add_path "/Applications/ShellHistory.app/Contents/Helpers"
if [ ! -n "$__shhist_session" ]
if [ -n "$TERM_SESSION_ID" ]
set __shhist_session $TERM_SESSION_ID
else
set __shhist_session (random)-$fish_pid
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
if test -f /usr/local/Caskroom/miniconda/base/bin/conda
eval /usr/local/Caskroom/miniconda/base/bin/conda "shell.fish" hook $argv | source &
end
end
functions --copy fish_prompt fish_prompt_original
function fish_prompt
set __shhist_status $status
if fish_is_root_user
set __shhist_user $SUDO_USER
else
set __shhist_user $LOGNAME
end
\history --show-time="%s " -1 | sudo --preserve-env --user $__shhist_user /Applications/ShellHistory.app/Contents/Helpers/shhist insert --session $__shhist_session --username $LOGNAME --hostname (hostname) --exit-code $__shhist_status --shell fish
fish_prompt_original;
end
atuin init fish --disable-up-arrow| source
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
if test -f /usr/local/Caskroom/miniconda/base/bin/conda
eval /usr/local/Caskroom/miniconda/base/bin/conda "shell.fish" "hook" $argv | source &
end
# <<< conda initialize <<<
# <<< conda initialize <<<
source ~/.config/fish/shell.fish
@ -57,32 +29,9 @@ function ss
end
function s
kitty +kitten ssh $argv
kitty +kitten ssh $argv
end
function icat
kitty +kitten icat --align=left $argv
end
function sg
set -l query ""
set -l option ""
for arg in $argv
if test "$arg" = '-s'; or test "$arg" = '--code'
set option $arg
else
if test -n "$query"
set query "$query $arg"
else
set query $arg
end
end
end
if test -n "$option"
command sgpt $option -- "$query"
else
command sgpt -- "$query"
end
kitty +kitten icat --align=left $argv
end