diff options
| author | Anton Bobov <anton@bobov.name> | 2024-08-14 23:55:47 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2024-08-14 23:55:47 +0500 |
| commit | 111bd2e49b61fe658144fbf06cf121d15aa5e8ea (patch) | |
| tree | b7f218ca0e85688dbee543b349d698f5a9f7c53d | |
| parent | 16f22292352d7a74ca83f89e2e037c25874c68dc (diff) | |
zsh: New aliases
| -rw-r--r-- | files/.zsh/rc/S50_aliases | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/files/.zsh/rc/S50_aliases b/files/.zsh/rc/S50_aliases index 8e9c766..ebabd2c 100644 --- a/files/.zsh/rc/S50_aliases +++ b/files/.zsh/rc/S50_aliases @@ -14,6 +14,22 @@ alias -g XC='|xclip -selection clipboard' alias -g UP='|&\up' alias -g S='|sort' alias -g SN='|sort -n' +alias -g NO='>/dev/null' +alias -g NE='2>/dev/null' +alias -g NUL='&>/dev/null' +alias -g X='| xargs' +alias -g X1='| xargs -n 1' +alias -g XL='| tr "\n" "\0" | xargs -0' + +alias -g A1="| awk '{print \$1}'" +alias -g A2="| awk '{print \$2}'" +alias -g A3="| awk '{print \$3}'" +alias -g A4="| awk '{print \$4}'" +alias -g A5="| awk '{print \$5}'" +alias -g A6="| awk '{print \$6}'" +alias -g A7="| awk '{print \$7}'" +alias -g A8="| awk '{print \$8}'" +alias -g A9="| awk '{print \$9}'" # }}} # Suffix aliases {{{ @@ -23,6 +39,8 @@ alias -s pdf=open is_command wine && alias -s exe=wine alias -s jar="java -jar" alias -s git="git clone --recursive" +is_command gdebi && alias -s deb="sudo gdebi" || alias -s deb="sudo dpkg -i" +is_command aria2c && alias -s torrent="aria2c" # }}} # Common tools {{{ @@ -70,7 +88,10 @@ alias l='ls -l' alias d='dirs -v | head -10' alias da='\du -sch' -if is_command ncdu; then +if is_command gdu; then + alias du='gdu --no-delete --no-cross' + alias ncdu='gdu' +elif is_command ncdu; then alias du='ncdu -rr -x --exclude .git' alias ncdu='ncdu -q' else @@ -133,6 +154,7 @@ alias yd='yt-dlp' alias yd-date='yd --download-archive=download-archive.log --playlist-reverse --ignore-errors --output="[%(playlist_autonumber)04d] %(upload_date)s - %(title)s-%(id)s.%(ext)s"' alias yd-audio='yd --format bestaudio --embed-thumbnail --extract-audio --audio-format mp3' alias yd-cb='xsel -bo | xargs yt-dlp' +alias yd-url='yd --flat-playlist --get-url' # }}} # Building tools and development {{{ |
