]> git.draconx.ca Git - zshconf.git/blob - zprofile
zprofile: Consider user .dircolors if it exists.
[zshconf.git] / zprofile
1 # Copyright © 2009-2011, 2022 Nick Bowler
2 #
3 # Default configuration for zsh login shells.
4 #
5 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
6 # This is free software: you are free to do what the fuck you want to.
7 # There is NO WARRANTY, to the extent permitted by law.
8
9 if [[ -e /etc/profile.env ]]; then
10         source /etc/profile.env
11 fi
12
13 # Default path
14 path_front {,/usr,/usr/local}{/bin,/sbin} $HOME/bin
15
16 # Default user settings
17 export EDITOR=${EDITOR:-=vim}
18 export PAGER=${PAGER:-=less}
19 umask 022
20
21 shopts=$-
22 setopt nullglob
23
24 for sh in /etc/profile.d/*.sh ; do
25         if [[ -r $sh ]]; then
26                 source $sh
27         fi
28 done
29
30 unsetopt nullglob
31 set -$shopts
32 unset sh shopts
33
34 # Setup colours
35 eval `{ dircolors --sh $HOME/.dircolors || dircolors --sh; } 2>/dev/null`
36 if [[ -n "$LS_COLORS" && -z "$COLORTERM" ]]; then
37         export COLORTERM="ansi"
38 fi
39
40 # Configure terminal parameters
41 stty stop ''
42 case $KEYMAP in
43 colemak)
44         stty eof '^S'
45         ;;
46 esac