diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2025-07-27 21:03:50 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2025-07-27 21:03:50 +0800 |
| commit | cda0870089c57d9b3859af0e58de0349da559020 (patch) | |
| tree | a1e8c1dac6188439e478378d6b3f540d7f865d2a /profile | |
| parent | dfb947732c2c57ff16c6e037f7aeda1844628368 (diff) | |
Update
Diffstat (limited to 'profile')
| -rw-r--r-- | profile | 13 |
1 files changed, 6 insertions, 7 deletions
| @@ -1,8 +1,7 @@ | |||
| 1 | # trap 'exit.sh' EXIT | 1 | # trap 'exit.sh' EXIT |
| 2 | 2 | ||
| 3 | export PATH=~/.local/bin:$PATH | 3 | export PATH=~/.local/bin:$PATH |
| 4 | export PATH=~/go/bin:$PATH | 4 | export HELPER_DIR=${HELPER_DIR:=$HOME/helper} |
| 5 | export SETTING_DIR=${SETTING_DIR:=$HOME/helper} | ||
| 6 | export TERM=xterm-256color | 5 | export TERM=xterm-256color |
| 7 | export XDG_CONFIG_HOME=~/.config | 6 | export XDG_CONFIG_HOME=~/.config |
| 8 | export XDG_STATE_HOME=~/.local/share/ | 7 | export XDG_STATE_HOME=~/.local/share/ |
| @@ -34,12 +33,12 @@ shell=$(</proc/$$/cmdline sed -E 's/(.)-.+$/\1/' | tr -d '[\0\-]') | |||
| 34 | export shell=${shell##*/} | 33 | export shell=${shell##*/} |
| 35 | 34 | ||
| 36 | # load custom aliases | 35 | # load custom aliases |
| 37 | source $SETTING_DIR/alias | 36 | source $HELPER_DIR/alias |
| 38 | 37 | ||
| 39 | # sourcr rc files in private/ and bin/ | 38 | # sourcr rc files in private/ and bin/ |
| 40 | [[ -d $SETTING_DIR/private ]] && for f in $SETTING_DIR/private/*; do source $f; done | 39 | [[ -d $HELPER_DIR/private ]] && for f in $HELPER_DIR/private/*; do source $f; done |
| 41 | find $SETTING_DIR/bin -not -executable -name '*rc' | while read rcfile; do source $rcfile; done | 40 | find $HELPER_DIR/bin -not -executable -name '*rc' | while read rcfile; do source $rcfile; done |
| 42 | find $SETTING_DIR/bin -mindepth 1 -type d | while read dir; do PATH+=:${dir}; done | 41 | find $HELPER_DIR/bin -mindepth 1 -type d | while read dir; do PATH+=:${dir}; done |
| 43 | 42 | ||
| 44 | # fzf | 43 | # fzf |
| 45 | if which fzf &>/dev/null; then | 44 | if which fzf &>/dev/null; then |
| @@ -54,7 +53,7 @@ fi | |||
| 54 | if [[ $- =~ i ]]; then | 53 | if [[ $- =~ i ]]; then |
| 55 | if [[ $shell == zsh ]]; then | 54 | if [[ $shell == zsh ]]; then |
| 56 | setopt extended_glob interactive_comments | 55 | setopt extended_glob interactive_comments |
| 57 | fpath=($SETTING_DIR/zsh $fpath) | 56 | fpath=($HELPER_DIR/zsh $fpath) |
| 58 | alias history='history -i' | 57 | alias history='history -i' |
| 59 | autoload compinit; compinit | 58 | autoload compinit; compinit |
| 60 | 59 | ||