Cleanup behavior to function when things are missing
This commit is contained in:
parent
999422da87
commit
12e3c5a470
|
@ -1,5 +1,4 @@
|
||||||
if [ -z $_byobu_sourced ]; then
|
if [[ -z "$_byobu_sourced" && -x /usr/bin/byobu-launch ]]; then
|
||||||
_byobu_sourced=1 . /usr/bin/byobu-launch 2>/dev/null || true
|
_byobu_sourced=1 . /usr/bin/byobu-launch 2>/dev/null || true
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# set PATH so it includes user's private bin if it exists
|
# set PATH so it includes user's private bin if it exists
|
||||||
if [ -d "$HOME/bin" ] ; then
|
if [[ -d "$HOME/bin" ]] ; then
|
||||||
export PATH="~/bin:$PATH"
|
export PATH="~/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set PATH so it includes user's private bin if it exists
|
# set PATH so it includes user's private bin if it exists
|
||||||
if [ -d "$HOME/.local/bin" ] ; then
|
if [[ -d "$HOME/.local/bin" ]] ; then
|
||||||
export PATH="~/.local/bin:$PATH"
|
export PATH="~/.local/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
alias sudo="/usr/bin/sudo "
|
alias sudo="/usr/bin/sudo "
|
||||||
alias nvim="/usr/bin/nvim -p "
|
PREFERED_VI=$(type -fP nvim vim | head -1)
|
||||||
alias vim="nvim "
|
[[ -z "$PREFERED_VI" ]] && PREFERED_VI=$(type -fP vi | head -1) || alias vi_editor="$PREFERED_VI -p "
|
||||||
alias vi="nvim "
|
[[ -z "$PREFERED_VI" ]] && alias vi_editor='eval $EDITOR ' || alias vi_editor="$PREFERED_VI "
|
||||||
|
alias nvim="vi_editor "
|
||||||
|
alias vim="vi_editor "
|
||||||
|
alias vi="vi_editor "
|
||||||
|
|
||||||
alias lessr="less --raw-control-chars "
|
alias lessr="less --raw-control-chars "
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
if [[ -n "$(type -fP setxkbmap)" ]]; then
|
||||||
|
setxkbmap -option
|
||||||
|
setxkbmap -option caps:escape
|
||||||
|
setxkbmap -option caps:ctrl_modifier
|
||||||
|
fi
|
|
@ -0,0 +1,5 @@
|
||||||
|
if [[ -n "$(type -fP chezmoi)" ]]; then
|
||||||
|
CHEZMOI_OUT="$(chezmoi status || true)x"
|
||||||
|
[[ -n "$CHEZMOI_OUT" ]] && printf "\nChezmoi changes:\n" && echo "${CHEZMOI_OUT%?}"
|
||||||
|
unset CHEZMOI_OUT
|
||||||
|
fi
|
|
@ -1 +0,0 @@
|
||||||
chezmoi status || true
|
|
|
@ -0,0 +1 @@
|
||||||
|
echo ""
|
|
@ -1,3 +0,0 @@
|
||||||
setxkbmap -option
|
|
||||||
setxkbmap -option caps:escape
|
|
||||||
setxkbmap -option caps:ctrl_modifier
|
|
|
@ -1 +1,6 @@
|
||||||
eval "$(oh-my-posh init bash --config ~/.poshtheme.omp.json)"
|
if [[ -n "$(type -fP oh-my-posh)" ]]; then
|
||||||
|
OHMYPOSH_CONFIG=''
|
||||||
|
[[ -r ~/.poshtheme.omp.json ]] && OHMYPOSH_CONFIG="~/.poshtheme.omp.json"
|
||||||
|
eval "$(oh-my-posh init bash --config $OHMYPOSH_CONFIG)"
|
||||||
|
unset OHMYPOSH_CONFIG
|
||||||
|
fi
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
source <(chezmoi completion bash)
|
[[ -n "$BASH_COMPLETION_EXIST" && -n $(type -fP chezmoi) ]] && source <(chezmoi completion bash)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# The next line updates PATH for the Google Cloud SDK.
|
# The next line updates PATH for the Google Cloud SDK.
|
||||||
if [ -f '/usr/lib/google-cloud-sdk/path.bash.inc' ]; then source '/usr/lib/google-cloud-sdk/path.bash.inc'; fi
|
[[ -f '/usr/lib/google-cloud-sdk/path.bash.inc' ]] && source '/usr/lib/google-cloud-sdk/path.bash.inc'
|
||||||
# The next line enables shell command completion for gcloud.
|
# The next line enables shell command completion for gcloud (as long as gcloud is IN the path).
|
||||||
if [ -f '/usr/lib/google-cloud-sdk/completion.bash.inc' ]; then source '/usr/lib/google-cloud-sdk/completion.bash.inc'; fi
|
[[ -n "$(type -fP gcloud)" && -f '/usr/lib/google-cloud-sdk/completion.bash.inc' ]] && source '/usr/lib/google-cloud-sdk/completion.bash.inc'
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
source <(pip completion --bash)
|
[[ -n $(type -fP pip) ]] && source <(pip completion --bash)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
if [ -r /usr/bin/terraform ]; then
|
TERRAFORM_BIN=$(type -fP terraform | head -1)
|
||||||
complete -C /usr/bin/terraform terraform
|
if [[ -n $TERRAFORM_BIN ]]; then
|
||||||
|
complete -C $TERRAFORM_BIN terraform
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
[[ -x /usr/share/bash-completion/bash_completion ]] && BASH_COMPLETION_EXIST=1
|
Loading…
Reference in New Issue