Reorganize aliases
This commit is contained in:
parent
e72fa461f7
commit
bd6417336d
1 changed files with 35 additions and 15 deletions
|
@ -1,32 +1,45 @@
|
|||
#
|
||||
# Aliases for ls
|
||||
#
|
||||
|
||||
[ "$(uname -s | tr '[:upper:]' '[:lower:]')" = 'linux' ] && alias ls='ls --color=auto'
|
||||
alias ll='ls -lihF'
|
||||
alias la='ls -A'
|
||||
alias l='ll -A'
|
||||
hash eza 2>/dev/null && alias ls='eza'
|
||||
|
||||
alias sudo='sudo '
|
||||
alias grep='grep -n --color=auto'
|
||||
alias j='jobs'
|
||||
|
||||
#
|
||||
# Aliases for common commands
|
||||
#
|
||||
|
||||
alias df='df -h'
|
||||
alias grep='grep -n --color=auto'
|
||||
alias ip='ip --color'
|
||||
alias ipb='ip --color --brief'
|
||||
alias j='jobs'
|
||||
alias mount_ro='mount -o ro,noexec,noatime,nodev,nosuid,noiversion'
|
||||
hash tree 2>/dev/null && alias t='tree'
|
||||
hash duf 2>/dev/null && alias du='duf'
|
||||
hash htop 2>/dev/null && alias top='htop'
|
||||
alias sudo='sudo '
|
||||
|
||||
|
||||
#
|
||||
# Aliases for installed programs
|
||||
#
|
||||
|
||||
hash clang-format 2>/dev/null && alias clang-format='clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4, AllowShortFunctionsOnASingleLine: None, KeepEmptyLinesAtTheStartOfBlocks: false}"'
|
||||
hash sqlmap 2>/dev/null && alias sqlmap='sqlmap --user-agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"'
|
||||
hash sqlmap 2>/dev/null && alias sqlmap-tor='sqlmap --tor --tor-type=SOCKS5'
|
||||
hash duf 2>/dev/null && alias du='duf'
|
||||
hash helix 2>/dev/null && alias hx='helix'
|
||||
hash htop 2>/dev/null && alias top='htop'
|
||||
hash kitty 2>/dev/null && alias kitty_ssh='kitty +kitten ssh'
|
||||
hash nvim 2>/dev/null && alias vim='nvim'
|
||||
hash helix 2>/dev/null && alias hx='helix'
|
||||
hash sqlmap 2>/dev/null && alias sqlmap='sqlmap --user-agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"'
|
||||
hash sqlmap 2>/dev/null && alias sqlmap-tor='sqlmap --tor --tor-type=SOCKS5'
|
||||
hash tree 2>/dev/null && alias t='tree'
|
||||
|
||||
if hash yay 2>/dev/null; then
|
||||
reinstall_pattern() {
|
||||
PATTERN="$1"
|
||||
yay -S $(pacman -Qm | /bin/grep "$PATTERN" | cut -d ' ' -f1)
|
||||
}
|
||||
fi
|
||||
|
||||
#
|
||||
# More complex aliases
|
||||
#
|
||||
|
||||
# https://github.com/OpenXRay/xray-16
|
||||
if hash xr_3da 2>/dev/null; then
|
||||
|
@ -35,6 +48,13 @@ if hash xr_3da 2>/dev/null; then
|
|||
alias stalker_call_of_pripyat='xr_3da'
|
||||
fi
|
||||
|
||||
if hash yay 2>/dev/null; then
|
||||
reinstall_pattern() {
|
||||
PATTERN="$1"
|
||||
yay -S $(pacman -Qm | /bin/grep "$PATTERN" | cut -d ' ' -f1)
|
||||
}
|
||||
fi
|
||||
|
||||
if hash yt-dlp 2>/dev/null; then
|
||||
alias audio-dl='yt-dlp --extract-audio --audio-quality 0 --audio-format "vorbis"'
|
||||
alias youtube-dl='yt-dlp'
|
||||
|
|
Loading…
Reference in a new issue