From a8520fc7d959c650e4564ca818609f32171f5190 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 9 Dec 2020 09:41:39 +0300 Subject: [PATCH] aliases.zsh --- .zshrc | 6 +++--- aliases.zsh | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.zshrc b/.zshrc index 522805f..5e5cf92 100644 --- a/.zshrc +++ b/.zshrc @@ -13,10 +13,10 @@ source $ZDOTDIR/plugins.zsh source $ZDOTDIR/agents.zsh [ -e $ZDOTDIR/agents.user.zsh ] && source $ZDOTDIR/agents.user.zsh -source $ZDOTDIR/aliases.zsh -[ -e $ZDOTDIR/aliases.user.zsh ] && source $ZDOTDIR/aliases.user.zsh - source $ZDOTDIR/prompt.zsh [ -e $ZDOTDIR/prompt.user.zsh ] && source $ZDOTDIR/prompt.user.zsh +source $ZDOTDIR/aliases.zsh +[ -e $ZDOTDIR/aliases.user.zsh ] && source $ZDOTDIR/aliases.user.zsh + true diff --git a/aliases.zsh b/aliases.zsh index 3c92e60..369acf7 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -9,7 +9,14 @@ alias aptp='sudo apt-get purge' alias aptr='sudo apt-get remove' alias aptc='sudo apt-get --purge autoremove' alias aptk='sudo apt-key add' -alias apts='apt-cache search' +apts() { + [ -z $1 ] && return 1 + if [ -z $2 ]; then + apt-cache search $1 + else + apt-cache search $1 | grep $2 + fi +} # Youtube alias ydlbest="youtube-dl --merge-output-format mkv -f 'bestvideo+bestaudio'" @@ -17,3 +24,14 @@ alias ydlbest="youtube-dl --merge-output-format mkv -f 'bestvideo+bestaudio'" # feh alias feh="feh --cache-size 256 --version-sort --sort filename --image-bg black" +# git +alias gu="git pull" +alias gur="git pull --recurse-submodules" +alias gsui="git submodule update --recursive --init" +alias gsur="git submodule update --recursive --init --remote" + +# Фильтры +alias -g G="| grep" +alias -g L="| less" +alias -g NN='&>/dev/null' +