blob: cab9db9270aaad57510a218081f8cec6b67d4e97 (
plain) (
blame)
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
59
60
61
62
63
64
65
66
67
68
69
70
|
# -*- mode: sh -*-
# vim: ft=zsh
xzsource zshrc.pre
xzsource zshrc.{options,style}
### Bindings
bindkey -e
### Functions, Aliases
## Command replacements
[[ -x =bat ]] && alias cat=bat c='bat -pp'
[[ -x =bfs ]] && alias find=bfs
[[ -x =bsdtar ]] && alias tar=bsdtar
[[ -x =colordiff ]] && alias diff=colordiff dif='colordiff -u'
[[ -x =jaq ]] && alias jq=jaq
[[ -x =podman ]] && alias docker=podman
if [[ -x =eza ]] { alias ls=eza tree='ls -T'
} elif [[ -x =exa ]] { alias ls=exa tree='ls -T'
} elif [[ -x =lsd ]] { alias ls=lsd lh='ls --hyperlink=auto' tree='lh --tree' }
alias l='ls -l' ll='ls -l' la='ls -a' lla='ls -la'
[[ -x =ugrep ]] && alias grep='ugrep -G -.' xdump='ugrep -X ""'
alias uq='ug -Q' ux='ug -UX' uz='ug -z' g='ug -G -.'
## Convenience aliases
alias e='emacsclient -c -nw' E='emacsclient -c' m=micro n=nvim
alias ip='ip -c=auto'
alias dit='docker run -it --rm' drun='dit -v "$(pwd)":/pwd:Z -w /pwd'
alias ossh='ssh -oStrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Error'
alias x='xh -b'
## Program configuration
alias chafa='chafa -f sixel'
alias ffmpeg='ffmpeg -hide_banner'
alias ffprobe='ffprobe -hide_banner'
[ -f ~/.config/ripgrep.conf ] && export RIPGREP_CONFIG_PATH=~/.config/ripgrep.conf
export SKIM_DEFAULT_COMMAND='fd -t f || rg --files || find .'
if [[ -x =luarocks ]] {
typeset -T LUA_CPATH=$(luarocks path --lr-cpath) lua_cpath
typeset -T LUA_PATH="$(luarocks path --lr-path);/?.lua" lua_path
}
## Functions
autoload -Uz tt
t() {
mkdir -p /tmp/t
cd /tmp/t
}
# you may want to:
# set up jump/zoxide/etc
# zstyle :completion:*:hosts list of hosts
# hash -d short=directory
# setup terminal integration / osc0
xzsource zshrc.{local,post}
# if compinit hasn't ran, run it now
# this way there's at least some minimum compatibility with /etc/zshrc
if (( ! ${+_comps} )) {
autoload -Uz compinit
compinit -i
}
# if promptinit hasn't ran, run it now, and set a default prompt
if (( ! ${+functions[prompt]} )) {
autoload -Uz promptinit
promptinit
prompt zstyle fish
}
|