-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zsh_functions
71 lines (56 loc) · 1.76 KB
/
dot_zsh_functions
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
71
function _fzf_compgen_dir () {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
function _fzf_compgen_path () {
fd --hidden --follow --exclude ".git" . "$1"
}
export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude ".git"'
# export FZF_ALT_C_OPTS="--preview 'fzf_preview_cmd {}'"
export FZF_CTRL_T_COMMAND='fd --hidden --follow --exclude ".git"'
# export FZF_CTRL_T_OPTS="--preview 'fzf_preview_cmd {}'"
export FZF_DEFAULT_COMMAND='fd --hidden --follow --exclude ".git"'
function lookup () {
local cmd="$*"
[ "$(whence -p "${cmd}")" ] || return;
realpath "$(whence -p "${cmd}")"
}
function cmcd () {
cd $(cm source-path)
}
function mkcd() {
[ -n "$1" ] && mkdir -p "$1" && cd "$1";
}
# Alias
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
alias ......='cd ../../../../../'
alias .......='cd ../../../../../../'
alias ........='cd ../../../../../../../'
alias .........='cd ../../../../../../../../'
alias ..........='cd ../../../../../../../../../'
alias ...........='cd ../../../../../../../../../../'
alias c='cd ..'
alias cd..='cd ..'
alias k=kubectl
alias kn=knife
alias watch='watch --color '
alias w='watch --color '
alias clipin='xclip -selection clipboard'
alias clipout='xclip -o -selection clipboard'
alias t='todo.sh'
alias todo='todo.sh'
alias cm='chezmoi'
alias e='vim'
# FZF height for fzf-tab
export FZF_TMUX_HEIGHT="~22"
export FZF_DEFAULT_OPTS="--cycle --layout=reverse --height=${FZF_TMUX_HEIGHT} --bind tab:down,btab:up,ctrl-space:toggle,ctrl-t:select-all,ctrl-d:deselect-all"
export COMMA_PICKER=fzf
# Firefox log SSL KEYS (for Wireshark)
#export SSLKEYLOGFILE=~/ssl-keys.log