From e29d275466f8d8f0e06615b7b55af20bc2c0e2fc Mon Sep 17 00:00:00 2001 From: Faerbit Date: Tue, 20 Sep 2016 13:23:47 +0200 Subject: [PATCH] Updating delete-old-archives and rbtv. --- zsh_functions | 8 ++++---- zshrc | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/zsh_functions b/zsh_functions index 869481d..3e4ab0f 100644 --- a/zsh_functions +++ b/zsh_functions @@ -84,9 +84,9 @@ virtual_env_prompt() { REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) } } -delete-old-archives() { - sudo tarsnap --fsck - archives=$(sudo tarsnap --list-archives | sort) +_delete-old-archives() { + tarsnap --fsck + archives=$(tarsnap --list-archives | sort) del_archives=$(echo $archives | head -n $(($(echo $archives | wc -l) - 3))) del_archives=("${(@f)del_archives}") for archive in $del_archives @@ -96,7 +96,7 @@ delete-old-archives() { if [[ $reply == "y" ]] then echo "Deleting '$archive' ..." - sudo tarsnap -d -f "$archive" + tarsnap -d -f "$archive" fi done } diff --git a/zshrc b/zshrc index d78bd7d..3ca86c5 100644 --- a/zshrc +++ b/zshrc @@ -54,6 +54,7 @@ alias cmake='cmake -G Ninja' alias wlan='sudo netctl-auto list' alias adb-connect='adb connect 192.168.1.138:5555' alias sysupgrade='sudo zsh -ci _sysupgrade' +alias delete-old-archives='sudo zsh -ci _delete-old-archives' if test -f "$(which nvim)" then alias v='nvim' @@ -64,7 +65,7 @@ source ~/.zsh_functions export EDITOR=vim alias emacs='emacs -nw' alias aiawiki='ssh aia -L 80:ldap2:80' -alias rbtv='livestreamer twitch.tv/rocketbeanstv &' +alias rbtv='livestreamer "https://www.youtube.com/watch?v=mT0TbIqBliw" &' alias taketv='livestreamer twitch.tv/taketv &' alias ls='ls --color=auto' export ASPROOT=~/.asp