]> git.nbdom.net Git - nb.git/commitdiff
bashrc
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 24 Jun 2015 23:29:28 +0000 (00:29 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 24 Jun 2015 23:29:28 +0000 (00:29 +0100)
etc/bashrc.alias
etc/bashrc.function

index eae78a8e037a86dc33ea128bfcc99c1c91812e41..715c5b729a4a5ad40a63d218039545f3d6e59608 100644 (file)
@@ -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
index 32115253a356812d3d51f60738899017a40fd34e..191bc927393c9da4371e8cde4ef49f6c51852e49 100644 (file)
@@ -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%'