X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=bashrc;h=5be565dacebbc104dbe35c62327ee26040f504a1;hp=cbd3ac2903a6912580e06000a4f1bffd4905fcbd;hb=20794e99b3635c6b364f536631d779f8f3d78b28;hpb=8dfa1963e55ead8a842115a970fc3f99a1803cc6 diff --git a/bashrc b/bashrc index cbd3ac2..5be565d 100644 --- a/bashrc +++ b/bashrc @@ -374,7 +374,7 @@ function dvd () { function ripdvd () { mkdir -p ${HOME}/dvds cd ${HOME}/dvds - dvdbackup -v -M && eject + time dvdbackup -v -M && eject } ###################################################################### @@ -713,7 +713,7 @@ alias gma='gma.sh' # git clone http://fleuret.org/git/selector/ function selector-history () { - selector --bash -c 7,4,0,3 -q -l 15000 <(history) + selector --bash -c 7,4,0,3 -q <(history) } # Find pathes in the history and make a list of the existing ones @@ -753,6 +753,15 @@ bind '"\C-[c":"\C-a\C-kselector-cd\C-m"' HISTIGNORE="${HISTIGNORE}:selector-history" +function selector-printer () { + TMP=$(mktemp /tmp/selector-printer.XXXXXX) + selector -o ${TMP} <(lpstat -a | awk '{print $1}') + export PRINTER=$(cat ${TMP}) + echo "PRINTER=${PRINTER}" + rm -f ${TMP} + lpq +} + ###################################################################### function prompt_command () {