zshrc
author Mikael Berthe <mikael@lilotux.net>
Sun, 02 May 2021 12:58:39 +0200
changeset 48 604330c024f4
parent 41 be88f546392c
child 58 86928b7b5adb
permissions -rw-r--r--
Fix key bindings with screen TERM

#
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#
# Global Order: zshenv, zprofile, zshrc, zlogin
#
# Mikael Berthe configuration file, 2001-2012
#
# Thanks to Antoine Vouillon, Farzad Farid, Seth House,
# Frank Terbeck and all others who have nice ideas!
#
# Local system-specific changes should be done in the
# zsh_local directory.


fpath=($ZDOTDIR/functions $ZDOTDIR/zsh_local/functions $fpath)


####################
# History settings #
####################

export SAVEHIST=8192
export HISTSIZE=8192
export HIST_EXPIRE_DUPS_FIRST
export HISTFILE=$HOME/.history

#####################
# Terminal settings #
#####################

# Meta key and accents
if [[ -z ${TERM:#xterm*} || -z ${TERM:#rxvt*} || -z ${TERM:#linux*} ]]; then
  stty pass8
fi

# Can be necessary fo some environments
stty erase '^?'

##################
# Default prompt #
##################

# Full prompt (date, login, tty, hostname, cwd) on one
# line.  (This is the fallback prompt...)
export PS1="%T %B[%n:%l]%b %S%m%s:%~%# "
export PS2='%_.. > '

##############################
# Source configuration files #
##############################

# Common configuration files
for rc in $ZDOTDIR/zshrc.d/??-*.zrc; do
    [[ -r ${rc} ]] && source "$rc"
done
unset rc

# Local configuration files
# (Other that zshrc, which is sourced from our zshrc.d scripts)
localrcfiles=($ZDOTLOCALDIR/??-*.zrc) 2> /dev/null
for rc in $localrcfiles; do
    [[ -r ${rc} ]] && source "$rc"
done
unset rc localrcfiles