-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
56 lines (47 loc) · 1.59 KB
/
.zshrc
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env zsh
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
#---------------------------------------------
# _ _ __ _ _
# | | | | / _(_) |
# __| | ___ | |_| |_ _| | ___ ___
# / _` |/ _ \| __| _| | |/ _ \/ __|
# | (_| | (_) | |_| | | | | __/\__ \
# \__,_|\___/ \__|_| |_|_|\___||___/
#---------------------------------------------
# name : P S, Adithya
# email : [email protected]
#---------------------------------------------
# Set Path Dynamically
#---------------------------------------------
function pathman() {
local var_name="$1"
local new_dir="$2"
eval "val=\$$var_name"
case ":$val:" in
*":$new_dir:"*) ;;
*) eval "$var_name=\"$new_dir:\$$var_name\"" ;;
esac
}
# Set Base Config
#---------------------------------------------
export OSTYPE=$(uname -s | tr '[:upper:]' '[:lower:]')
export DOTFILES_DIR="${HOME}/.dotfiles"
# Load Zap
#---------------------------------------------
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] \
&& source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
# Plugins
#---------------------------------------------
plug "Aloxaf/fzf-tab"
plug "mroth/evalcache"
plug "zap-zsh/supercharge"
plug "zsh-users/zsh-autosuggestions"
plug "zsh-users/zsh-syntax-highlighting"
# plug "romkatv/powerlevel10k"
# Load evals, aliases, functions & commands
#---------------------------------------------
for z (${DOTFILES_DIR}/zsh/**/*(N.)) plug $z
# Tidying User Path
# ---------------------------------------------
typeset -U path cdpath fpath manpath