From 7b3a705eca186247bdd86d5e5234276549d7711d Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Wed, 20 Jan 2016 12:44:28 +0500 Subject: [PATCH] shellrc: +ttr --- etc/shell/bash/aliases | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/etc/shell/bash/aliases b/etc/shell/bash/aliases index 7c940d9..1db6ca5 100755 --- a/etc/shell/bash/aliases +++ b/etc/shell/bash/aliases @@ -43,7 +43,6 @@ alias mkdir="mkdir -p -v" #noindex alias j="jobs -l" #noindex alias dirs="dirs -v" #noindex alias src=vcat #noindex -alias tt=ctorrent #noindex #- Замена стандартных путей для конфигурационных файлов alias mpd="mpd $SHELLRC/etc/media/mpd/mpd.conf" #noindex @@ -250,6 +249,16 @@ sortf() { #noindex mkdir -p ./Vim ; command mv *{.vim,.vba} ./Vim } 2>&- +alias tt=ctorrent #noindex + +#- Переименовывание torrent-файла +ttr() { + echo mv -i -v \"$1\" \"$(dumptorrent -b "$1" \ + | cut -d ':' -f 2 \ + | sed 's/^ *//').torrent\" \ + | sh +} + #- Вывод размера файлов в отсортированном виде dus() { \du -smc "$@" | sort -gr | awk '{