From 778e80e09f6de51cbc6497eae8beda24edd4bf01 Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Tue, 9 May 2023 02:21:42 +0300 Subject: [PATCH] fish cleanup --- private_dot_config/private_fish/config.fish | 69 +++------------------ 1 file changed, 9 insertions(+), 60 deletions(-) diff --git a/private_dot_config/private_fish/config.fish b/private_dot_config/private_fish/config.fish index 9e230a7..5f1f92d 100644 --- a/private_dot_config/private_fish/config.fish +++ b/private_dot_config/private_fish/config.fish @@ -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