summaryrefslogtreecommitdiff
path: root/user/.zshrc
blob: c3548b800b8367a684b150d948eeb72fa817f284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function __source_startup_files()
{
    # source the global configution file
    local __source_file="/etc/zshrc"

    if [ -r "$__source_file" ]; then
        source "$__source_file"
    fi

    local __source_dir

    if [ -n "$ZDOTDIR" ]; then
        __source_dir="$ZDOTDIR/.zsh"
    elif [ -n "$HOME" ]; then
        __source_dir="$HOME/.zsh"
    else
        return
    fi
    
    # source every file readable in .zsh
    for __source_file in $(find "$__source_dir" -type f -readable); do
        source "$__source_file"
    done
}

__source_startup_files
unset __source_startup_files

ulimit -c unlimited