Add ZSH and BASH configs
This commit is contained in:
43
shell/zshrc
Normal file
43
shell/zshrc
Normal file
@@ -0,0 +1,43 @@
|
||||
# Include our shared shell stuff
|
||||
source ~/dotfiles/shell/env
|
||||
source ~/dotfiles/shell/aliases
|
||||
source ~/dotfiles/shell/functions
|
||||
|
||||
# History Settings
|
||||
export HISTIGNORE="&:ls:[bf]g:exit:reset:clear:cd:cd ..:cd.."
|
||||
export HISTSIZE=25000
|
||||
export HISTFILE=~/.zsh_history
|
||||
export SAVEHIST=10000
|
||||
setopt INC_APPEND_HISTORY
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_REDUCE_BLANKS
|
||||
setopt HIST_VERIFY
|
||||
|
||||
# Say how long a command took, if it took more than 30 seconds
|
||||
export REPORTTIME=30
|
||||
|
||||
# Prompts for confirmation after 'rm *' etc
|
||||
# Helps avoid mistakes like 'rm * o' when 'rm *.o' was intended
|
||||
setopt RM_STAR_WAIT
|
||||
|
||||
# Background processes aren't killed on exit of shell
|
||||
setopt AUTO_CONTINUE
|
||||
|
||||
# Don’t write over existing files with >, use >! instead
|
||||
setopt NOCLOBBER
|
||||
|
||||
# Don’t nice background processes
|
||||
setopt NO_BG_NICE
|
||||
|
||||
# Makes Alt-s insert a sudo at beginning of prompt
|
||||
function insert_sudo {
|
||||
if [[ $BUFFER != "sudo "* ]]; then
|
||||
BUFFER="sudo $BUFFER"; CURSOR+=5
|
||||
fi
|
||||
}
|
||||
zle -N insert-sudo insert_sudo
|
||||
bindkey "^[s" insert-sudo
|
||||
|
||||
# Theme for Oh-My-ZSH
|
||||
ZSH_THEME="ys"
|
Reference in New Issue
Block a user