ZSH
This commit is contained in:
parent
f6a7963f1d
commit
20e67036df
22 changed files with 2414 additions and 246 deletions
42
config/shell/bashrc
Normal file
42
config/shell/bashrc
Normal file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Bash aliases and customizations
|
||||
#
|
||||
|
||||
# Shell options
|
||||
|
||||
shopt -s expand_aliases
|
||||
shopt -s histappend
|
||||
|
||||
HISTCONTROL=ignoreboth:erasedups
|
||||
|
||||
# Prompt customization
|
||||
|
||||
INTERACTIVE_BASHPID_TIMER="${HOME}/.cache/bash_timer_$$"
|
||||
|
||||
PS0='$(echo $SECONDS > "$INTERACTIVE_BASHPID_TIMER")'
|
||||
|
||||
function _update_ps1() {
|
||||
local __ERRCODE=$?
|
||||
|
||||
local __DURATION=0
|
||||
if [ -e "$INTERACTIVE_BASHPID_TIMER" ]; then
|
||||
local __END=$SECONDS
|
||||
local __START=$(cat "$INTERACTIVE_BASHPID_TIMER")
|
||||
__DURATION="$(($__END - ${__START:-__END}))"
|
||||
\rm -f "$INTERACTIVE_BASHPID_TIMER"
|
||||
fi
|
||||
|
||||
# echo -en "… $\r"
|
||||
eval "$(powerline-go -shell bash -eval -duration $__DURATION -error $__ERRCODE "${POWERLINE_GO_DEFAULT_OPTS[@]}")"
|
||||
}
|
||||
|
||||
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||
|
||||
# Completion
|
||||
trysource /usr/share/bash-completion/bash_completion
|
||||
|
||||
# Fuzzy matching all the way
|
||||
trysource /usr/share/fzf/completion.bash
|
||||
trysource /usr/share/fzf/key-bindings.bash
|
Loading…
Add table
Add a link
Reference in a new issue