From 500ebb7baa79a9af5c8eadcff00de00b6408b51f Mon Sep 17 00:00:00 2001 From: tengel Date: Wed, 20 Mar 2024 11:25:14 -0500 Subject: [PATCH] adding zshrc --- zshrc | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 zshrc diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..0fcda8d --- /dev/null +++ b/zshrc @@ -0,0 +1,60 @@ +# .zshrc + +## Debian style bashrc prompts and color setup +#force_color_prompt=yes +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac +if [ -n "$force_color_prompt" ]; then + # 'tput setaf 1' attempts to set foreground color using ANSI escape + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + color_prompt=yes + else + color_prompt= + fi +fi +# PS1 can set '%1~' instead of '%~' to only show the last dirname part +if [ "$color_prompt" = yes ]; then + PS1='%B%F{green}%n@%m%F{white}%b:%B%F{blue}%~%b%F{white}%f$ ' + if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors \ + && eval "$(dircolors -b ~/.dircolors)" \ + || eval "$(dircolors -b)" + alias ls='ls --color=auto' + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + fi +else + PS1='%n@%m:%~$ ' +fi +# continuation lines +PS2='> ' +# interactive with (select) +PS3='#? ' +# tracing scripts (set -x) +PS4='+ ' +unset color_prompt force_color_prompt + +# history +setopt histignoredups histignorespace appendhistory sharehistory +HISTSIZE=1000 +SAVEHIST=2000 +HISTFILE=~/.zsh_history + +# completion system +autoload -Uz compinit +compinit + +# match . files with tab complete +setopt globdots + +# man zshoptions +setopt NO_BEEP NO_AUTO_LIST BASH_AUTO_LIST NO_MENU_COMPLETE NO_AUTO_MENU +unsetopt ALWAYS_LAST_PROMPT + +# man zshmodules, zshcompsys +zstyle ':completion:*' group-name '' +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' list-colors '' +zstyle ':completion:*' use-compctl false