Merge branch 'add_duphist' of ajohnson/zsh into master

pull/7/head
Aaron Johnson 7 years ago committed by Gitea
commit 69e3d95cee

@ -2,9 +2,11 @@
BSD_MODE=false #Some options must be specified differently in BSD
SYNTAX_HIGHLIGHT=true #On-the-fly syntax highlighting of commands that you type
AUTO_CD=true #When true, if only a directory path is entered, you will cd to the directory
HISTORY_HIDE_SPACE=true #Does not record to history any command starting with a space (good for passing sensitive data like passwords on the command line)
HISTORY_NO_DUPS=true #Ignore duplicate back-to-back commands in shell history
# Prompt Style
PROMPT_STYLE=bsd #Valid options: bsd, bsd2, ar5
PROMPT_STYLE=bsd2 #Valid options: bsd, bsd2, ar5
COMPLETION_STYLE=bash #ZSH "automenu" option toggle - Valid options: bash, zsh (defaults to bash)
# Example prompts:
@ -16,7 +18,7 @@ COMPLETION_STYLE=bash #ZSH "automenu" option toggle - Valid options: bash, zsh
# Prompt Colours
COLOR_USER=cyan
COLOR_HOST=cyan
COLOR_PWD=cyan
COLOR_PWD=green
COLOR_VCS=green
### Color Legend #

@ -2,12 +2,50 @@ autoload -U compinit promptinit
autoload -U colors && colors
compinit -d ${HOME}/.cache/.zcompdump
promptinit
#Check sanity of configuration values, and warn user if they are outdated/don't exist
if [ -z ${AUTO_CD+x} ]
then
printf "AUTO_CD is unset! Check example_configs/zsh.conf for the latest options.\nDefaulting $(tput setaf 2)$(tput bold)AUTO_CD$(tput sgr0) to $(tput setaf 3)$(tput bold)true$(tput sgr0).\n\n"
AUTO_CD=true
fi
if [ -z ${HISTORY_HIDE_SPACE+x} ]
then
printf "HISTORY_HIDE_SPACE is unset! Check example_configs/zsh.conf for the latest options.\nDefaulting $(tput setaf 2)$(tput bold)HISTORY_HIDE_SPACE$(tput sgr0) to $(tput setaf 3)$(tput bold)true$(tput sgr0).\n\n"
HISTORY_HIDE_SPACE=true
fi
if [ -z ${HISTORY_NO_DUPS+x} ]
then
printf "HISTORY_NO_DUPS is unset! Check example_configs/zsh.conf for the latest options.\nDefaulting $(tput setaf 2)$(tput bold)HISTORY_NO_DUPS$(tput sgr0) to $(tput setaf 3)$(tput bold)true$(tput sgr0).\n\n"
HISTORY_NO_DUPS=true
fi
if [ -z ${COMPLETION_STYLE+x} ]
then
printf "COMPLETION_STYLE is unset! Check example_configs/zsh.conf for the latest options.\nDefaulting $(tput setaf 2)$(tput bold)COMPLETION_STYLE$(tput sgr0) to $(tput setaf 3)$(tput bold)bash$(tput sgr0).\n\n"
COMPLETION_STYLE=true
fi
#Set options
if [ $AUTO_CD = true ]
then
setopt autocd
fi
unsetopt beep
if [ $HISTORY_HIDE_SPACE = true ]
then
setopt HIST_IGNORE_SPACE
fi
if [ $HISTORY_NO_DUPS = true ]
then
setopt HIST_IGNORE_DUPS
fi
if [ $COMPLETION_STYLE = bash ]
then
setopt noautomenu

Loading…
Cancel
Save