diff --git a/etc/shell/bash/aliases b/etc/shell/bash/aliases index 3c5bd86..b99a91f 100755 --- a/etc/shell/bash/aliases +++ b/etc/shell/bash/aliases @@ -71,8 +71,6 @@ alias g=git #noindex alias startx="xinit -- /usr/bin/X" #noindex alias lftp="LFTP_HOME=$SHELLRC/etc/net/lftp lftp" #noindex -alias vk="TERM=xterm vk-cli" #noindex - alias fm="nnn" #noindex if [ $UID -eq 0 ]; then @@ -156,9 +154,6 @@ printf "$white ----------------------------------------------------------------------$rstc\n\n" } -#- Бэкап настроек -b_back() { tar cvpzf "./Bash_`\date +%d-%m-%Y.%T`".tgz $SHELLRC; } - #- Цветовые коды консоли colors() { for i in {000..125}; { @@ -182,30 +177,15 @@ path() { echo $PATH | tr ':' '\n' | nl } -#- -alias w1="watch -n 1" #noindex - #- Взятие строк в кавычки quote() { sed 's/^\|$/"/g' } #}}} ########################################################################### -#{{{ \033[00m\n\b------<Сетевые_функции>\n -################################################################################ - -#- php-сервер -phps() { - php -S ${2:-localhost}:${3:-80} -t ${1:-.} -} - -#}}} ########################################################################### #{{{ \033[00m\n\b------<Работа_с_файлами>\n ################################################################################ -#- Vim -alias :e="nvim" #noindex - #- Написание текстов в Vim write() { # urxvtc -fn 'xft:TrixiePro:pixelsize=20' \ @@ -302,23 +282,11 @@ alias tt=ctorrent #noindex #- Переименовывание torrent-файла ttr() { echo mv -i -v \"$1\" \"tt_$(dumptorrent -b "$1" \ - | cut -d ':' -f 2 \ - | sed 's/^ *//').torrent\" \ + | cut -d ':' -f 2 \ + | sed 's/^ *//').torrent\" \ | sh } -#- type с подсветкой синтаксиса -function get_type() { #noindex - command type "$1" | source-highlight \ - --src-lang=sh \ - -f esc \ - -o STDOUT \ - --line-number=' ' \ - --style-file=$SHELLRC/etc/soft/source-hl/default.style - echo -} -alias :?="get_type" - #- Ссылка на книгу для чтения toread() { BASEDIR="$HOME/FILES/_Книги/Прочесть" @@ -336,13 +304,16 @@ src() { vcat "$1" | less -R; } #- Поиск пути к исполняемому файлу, просмотр кода функций и псевдонимов which() { #noindex - (alias; declare -f) \ - | /usr/bin/which \ - --tty-only \ - --read-alias \ - --read-functions \ - --show-tilde \ - --show-dot $@ + RESULT=$((alias; declare -f) \ + | /usr/bin/which \ + --tty-only \ + --read-alias \ + --read-functions \ + --show-tilde \ + --show-dot $@) + + ([ -n "$RESULT" ] && echo "$RESULT" || type $@) | vcat -l bash + } 2>/dev/null #- Переход в директорию файла @@ -383,9 +354,6 @@ apply() { } } -#- Список PDF-файлов -alias pdfs="find `pwd` -maxdepth 1 -name '*.pdf'" #noindex - #}}} ########################################################################### #{{{ \033[00m\n\b------<Администрирование>\n ################################################################################ @@ -405,9 +373,6 @@ lnbin() { ln -s $(realpath $1) $SHELLRC/bin/$2/$1 } -#- UUID носителей -alias uuids="ls /dev/disk/by-uuid/" - #}}} ########################################################################### #{{{ \033[00m\n\b------<Управление_сервисами_и_процессами>\n ################################################################################ diff --git a/etc/soft/git/gitconfig b/etc/soft/git/gitconfig index 2a9a8c4..caab287 100644 --- a/etc/soft/git/gitconfig +++ b/etc/soft/git/gitconfig @@ -35,12 +35,13 @@ df = diff br = branch + cb = !git branch | grep "\\*" st = status p = pull u = "!echo git push origin $(git rev-parse --abbrev-ref HEAD)" - ua = !g remote -v | awk '{ print $1 }' | uniq | xargs -IL echo "git push L $(git branch | grep '\*' | awk '{ print $2 }')" + up = "!git remote -v | awk '{ print $1 }' | uniq | xargs -IL echo git push L $(git cb | awk '{ print $2 }')" co = checkout