From: Nicolas Boisselier Date: Wed, 24 Jun 2015 23:29:28 +0000 (+0100) Subject: bashrc X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=31bb1d134c81b516198204cfe6f3ead5c933024f;p=nb.git bashrc --- diff --git a/etc/bashrc.alias b/etc/bashrc.alias index eae78a8e..715c5b72 100644 --- a/etc/bashrc.alias +++ b/etc/bashrc.alias @@ -46,8 +46,10 @@ test "$TERM_PROGRAM" = "iTerm.app" && export PROMPT_COMMAND='printf "\033]0;%s\0 #-------------------------------------------------------------------------------- # Get / Head # -alias Head="lynx -dump -head -width=0" -alias Get="lynx -source -width=0" +#if which lynx &> /dev/null; then + alias Head="lynx -dump -head -width=0" + alias Get="lynx -source -width=0" +#fi #-------------------------------------------------------------------------------- # bc @@ -79,7 +81,6 @@ if which btlaunchmanycurses.py &> /dev/null; then opt="$opt --max_download_rate 150 --max_files_open 0" alias torrent="btdownloadcurses.py $opt" - alias torrentdir="btlaunchmanycurses.py $opt" elif which btdownloadcurses &> /dev/null; then diff --git a/etc/bashrc.function b/etc/bashrc.function index 32115253..191bc927 100644 --- a/etc/bashrc.function +++ b/etc/bashrc.function @@ -319,16 +319,17 @@ nb-ips() { } nb-radio-play() { - local radios=" + local radios="\ 1 | FranceInter | http://www.tv-radio.com/station/france_inter_mp3/france_inter_mp3-128k.m3u 2 | Indie | http://107.155.126.42:17160/listen.pls 3 | FranceInof | http://players.creacast.com/creacast/france_info/playlist.m3u 4 | FranceCulture | http://www.tv-radio.com/station/france_culture_mp3/france_culture_mp3-128k.m3u + +Choose one > \ " - read -s -p "$radios" - test $REPLY -gt 0 2> /dev/null || return - #echo -e "$radios" | awk 'BEGIN {$FS=" | "} $1 == '$REPLY' {print $1"."$2"."$3"."$4}' - awk -F '|' '$1 == '$REPLY' {print $3; exit}' <<< "$radios" | sed 's/^ //' | xargs -r mplayer + read -p "$radios" + test -z "$REPLY" 2>/dev/null && return + awk -F '|' '$1 == '$REPLY' {print $3; exit}' <<< "$radios" | sed 's/^ //' | xargs mplayer 2>/dev/null } alias nb-img2jpg='convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85%'