fish cleanup
This commit is contained in:
parent
936a324282
commit
778e80e09f
@ -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 -gx PATH /usr/local/bin $PATH
|
||||||
set fish_color_valid_path
|
set fish_color_valid_path
|
||||||
|
|
||||||
@ -6,42 +6,14 @@ set fish_color_valid_path
|
|||||||
# Commands to run in interactive sessions can go here
|
# Commands to run in interactive sessions can go here
|
||||||
if status is-interactive
|
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"
|
# >>> conda initialize >>>
|
||||||
|
# !! Contents within this block are managed by 'conda init' !!
|
||||||
if [ ! -n "$__shhist_session" ]
|
if test -f /usr/local/Caskroom/miniconda/base/bin/conda
|
||||||
if [ -n "$TERM_SESSION_ID" ]
|
eval /usr/local/Caskroom/miniconda/base/bin/conda "shell.fish" hook $argv | source &
|
||||||
set __shhist_session $TERM_SESSION_ID
|
|
||||||
else
|
|
||||||
set __shhist_session (random)-$fish_pid
|
|
||||||
end
|
end
|
||||||
end
|
# <<< conda initialize <<<
|
||||||
|
|
||||||
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 <<<
|
|
||||||
|
|
||||||
source ~/.config/fish/shell.fish
|
source ~/.config/fish/shell.fish
|
||||||
|
|
||||||
@ -57,32 +29,9 @@ function ss
|
|||||||
end
|
end
|
||||||
|
|
||||||
function s
|
function s
|
||||||
kitty +kitten ssh $argv
|
kitty +kitten ssh $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
function icat
|
function icat
|
||||||
kitty +kitten icat --align=left $argv
|
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
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user