[misc] clean up file sourcing
This commit is contained in:
parent
9861ebe5d2
commit
008d5cdede
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/env fish
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# datetime in filename format
|
# datetime in filename format
|
||||||
function dt
|
function dt
|
||||||
date "+%Y%m%d-%H%M%S"
|
date "+%Y%m%d-%H%M%S"
|
||||||
|
@ -94,17 +92,12 @@ if status is-interactive
|
||||||
end
|
end
|
||||||
|
|
||||||
function source-file-if-exists
|
function source-file-if-exists
|
||||||
if test -e $argv
|
for f in $argv
|
||||||
source $argv
|
test -e $f && source $f && return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
source-file-if-exists ~/.cargo/env
|
|
||||||
|
|
||||||
append-path-if-exists /usr/local/bin
|
|
||||||
append-path-if-exists ~/.local/bin
|
|
||||||
append-path-if-exists ~/.yarn/bin
|
append-path-if-exists ~/.yarn/bin
|
||||||
append-path-if-exists /snap/bin
|
|
||||||
alias k="kubectl"
|
alias k="kubectl"
|
||||||
alias kcc="k config get-contexts"
|
alias kcc="k config get-contexts"
|
||||||
alias kcu="k config use-context"
|
alias kcu="k config use-context"
|
||||||
|
@ -115,10 +108,7 @@ if status is-interactive
|
||||||
alias issh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
alias issh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
||||||
alias iscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
alias iscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
|
||||||
cd $last_pwd
|
cd $last_pwd
|
||||||
source-file-if-exists /usr/share/autojump/autojump.fish
|
source-file-if-exists /usr/share/autojump/autojump.fish /usr/local/share/autojump/autojump.fish
|
||||||
source-file-if-exists /usr/local/share/autojump/autojump.fish
|
|
||||||
#source-file-if-exists ~/.config/fish/virtualfish
|
|
||||||
source-file-if-exists ~/.profile.fish
|
|
||||||
source-file-if-exists ~/.profile.fish
|
source-file-if-exists ~/.profile.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user