24 lines
689 B
Fish
24 lines
689 B
Fish
if status is-interactive
|
|
|
|
if not functions -q __cd_orig
|
|
functions --copy cd __cd_orig
|
|
end
|
|
|
|
function cd --wraps=cd --description "Change directory. No args goes to git root or $HOME."
|
|
if test (count $argv) -ne 0; or not git rev-parse --is-inside-work-tree &>/dev/null
|
|
__cd_orig $argv
|
|
else
|
|
__cd_orig (git rev-parse --show-toplevel)
|
|
end
|
|
end
|
|
|
|
starship init fish | source
|
|
direnv hook fish | source
|
|
zoxide init fish | source
|
|
thefuck --alias | source
|
|
fzf --fish | source && fzf_configure_bindings
|
|
if test "$SSH_TTY"
|
|
set -gx COLORTERM truecolor
|
|
set -gx TERM xterm-256color
|
|
end
|
|
end
|