mirror of
https://github.com/rydesun/dotfiles.git
synced 2025-12-26 14:44:58 +08:00
zsh: add alias and funcs
This commit is contained in:
parent
15ff5e3473
commit
365255eeaa
1 changed files with 4 additions and 3 deletions
|
|
@ -255,6 +255,7 @@ alias ncdu='ncdu --color dark'
|
|||
alias mv='mv -i'
|
||||
alias mitmproxy="mitmproxy --set confdir=$XDG_CONFIG_HOME/mitmproxy"
|
||||
alias mitmweb="mitmweb --set confdir=$XDG_CONFIG_HOME/mitmproxy"
|
||||
alias rsync="rsync -avhHP"
|
||||
if [[ $TERM == 'xterm-kitty' ]]; then
|
||||
alias ssh='kitty +kitten ssh'
|
||||
alias rg='kitty +kitten hyperlinked_grep'
|
||||
|
|
@ -291,11 +292,11 @@ mountdisk() {
|
|||
# Arch Linux
|
||||
alias pmq='pacman -Qs'
|
||||
alias pms='pacman -Ss'
|
||||
pmi() { pacman -Qi $1 2>/dev/null || pacman -Sii $1 }
|
||||
pmi() { pacman -Qii $1 2>/dev/null || pacman -Sii $1 }
|
||||
pmo() { pacman -Qoq $1 2>/dev/null || pkgfile -i $1 }
|
||||
pml() { (pacman -Qlq $1 2>/dev/null || pkgfile -lq $1) | sed '/\/$/d' }
|
||||
pmb() { (pacman -Qlq $1 2>/dev/null || pkgfile -lq $1) | awk -F/ '/\/usr\/bin\/.+[^/]$/{print $NF}' }
|
||||
pmd() { (pacman -Qlq $1 2>/dev/null || pkgfile -lq $1) | grep -e '\.service$' -e '\.socket$' }
|
||||
pmb() { pml $1 | awk -F/ '/\/usr\/bin\/.+[^/]$/{print $NF}' }
|
||||
pmd() { pml $1 | grep -e '\.service$' -e '\.socket$' -e '\.timer$' }
|
||||
# >>>-----------------------------------
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue