-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_shell.tmpl
More file actions
58 lines (45 loc) · 1.3 KB
/
dot_shell.tmpl
File metadata and controls
58 lines (45 loc) · 1.3 KB
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
57
58
# Any copyright is dedicated to the Public Domain.
# https://creativecommons.org/publicdomain/zero/1.0/
# grep
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# Use neovim
alias vi='nvim'
alias vim='nvim'
# ls
alias ls='ls --color -F -H'
alias l=ls
alias ll='ls --color -a -lFh'
# rm
alias rm='trash'
# less
alias less='less -r'
encrypt () {
age -a -R ~/.ssh/id_ed25519.pub "$1" > "$1".age
}
decrypt () {
str=$1
age -d -i ~/.ssh/id_ed25519 "$1" > "${str:0:-4}"
}
c () {
bc <<<"$1"
}
format-json () {
tmep=$(mktemp)
cp -- "$1" "$temp"
jq . "$temp" > "$1"
}
export OPAMROOT="$HOME/.local/share/opam"
export GOPATH="$HOME/.local/share/go"
export GOBIN=$GOPATH"/bin"
# neovim
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
{{ if ne .chezmoi.os "darwin" }}
alias check-tarsnap='sudo tarsnap --list-archives | sort'
test -r $HOME/.local/share/opam/opam-init/init.sh && . $HOME/.local/share/opam/opam-init/init.sh > /dev/null 2> /dev/null || true
{{ else }}
[[ ! -r '$HOME/.local/share/opam/opam-init/init.zsh' ]] || source '$HOME/.local/share/opam/opam-init/init.zsh' > /dev/null 2> /dev/null
{{ end }}