-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaliases.zsh
49 lines (40 loc) · 1.46 KB
/
aliases.zsh
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
if [[ -z "$ZEXT_ALIAS" ]]; then
alias ducks="du -cks * | sort -rn | head -11"
alias random="env LC_CTYPE=C LC_ALL=C tr -dc "a-zA-Z0-9-_\$\?" < /dev/urandom | head -c 32; echo"
setopt pushdminus
alias -- -='cd -'
alias 1='cd -'
alias 2='cd -2'
alias 3='cd -3'
alias 4='cd -4'
alias 5='cd -5'
alias 6='cd -6'
alias 7='cd -7'
alias 8='cd -8'
alias 9='cd -9'
alias d='dirs -v | head -10'
# Push and pop directories on directory stack
alias pu='pushd'
alias po='popd'
if (( ${+commands[rsync]} )); then
alias rsynccopy="rsync --partial --progress --append --rsh=ssh -r -h "
alias rsyncmove="rsync --partial --progress --append --rsh=ssh -r -h --remove-sent-files"
fi
if (( ${+commands[curl]} )); then
alias whatsmyip="curl -L https://ip.patthemav.com/"
elif (( ${+commands[wget]} )); then
alias whatsmyip="wget -q -O - https://ip.patthemav.com/"
fi
if (( ${+commands[yt-dlp]} )); then
alias yt-mp4="yt-dlp -f 'bestvideo[vcodec^=avc1]+bestaudio[acodec^=mp4a]/mp4'"
alias yt-webm="yt-dlp -f 'bestvideo[vcodec^=vp9]+bestaudio[acodec^=opus]/webm'"
alias yt-av1="yt-dlp -f 'bestvideo[vcodec^=av01]+bestaudio[acodec^=mp4a]/mp4'"
fi
if (( ${+commands[git]} )); then
alias grm="git ls-files --deleted -z | xargs -0 git rm"
fi
if (( ${+commands[bat]} )); then
READNULLCMD='bat'
fi
ZEXT_ALIAS="${ZEXT_ALIAS:-1}"
fi