-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
54 lines (45 loc) · 1.24 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
# autoload
autoload -Uz compinit && compinit
autoload -U promptinit && promptinit
source "/usr/local/opt/spaceship/spaceship.zsh"
# setopt
setopt autocd
setopt hist_ignore_all_dups
setopt hist_ignore_space
# exports
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export MANPAGER="less -X"
export LESS_TERMCAP_md=$'\E[1;36m'
# aliases
alias l="ls -l"
alias la="ls -la"
alias lla="l -a"
alias lh="l -h"
alias l1="ls -1"
alias nah="git reset --hard; git clean -df"
# ssh aliases
if [ -f ~/.ssh/aliases ]; then
. ~/.ssh/aliases
fi
# operating system specific settings
# Darwin
if [ "$(uname)" = "Darwin" ]; then
# exports
export PATH="${HOME}/bin:${HOME}/.composer/vendor/bin:${PATH}:/usr/local/sbin"
export COPYFILE_DISABLE=1
export GREP_OPTIONS="--color=auto"
export GREP_COLOR="1;31;49"
# aliases
alias ls="ls -FG"
alias df="df -PhT apfs,hfs,afpfs,exfat,fuse4x,msdos,osxfuse,nfs"
fi
ansible_vaults() {
for file in /Volumes/Encrypted/ansible-vaults/*.txt; do
printf "\55\55vault-id=%s@%s " "$(basename ${file})" "${file}"
done
}
alias ansible-playbook="ansible-playbook $(ansible_vaults)"
alias ansible="ansible $(ansible_vaults)"
setopt prompt_subst
autoload -U colors && colors # Enable colors in prompt