Allow to send command result to different clipboard/buffer.

This commit is contained in:
Jeremy Gardais 2017-09-18 10:58:08 +02:00
parent c3ecd3c98d
commit bb2ef487d7
1 changed files with 4 additions and 1 deletions

5
zshrc
View File

@ -189,6 +189,8 @@ alias -g M="| most"
alias -g S="| sort"
alias -g V="| vimmanpager"
alias -g W="| wc -l"
alias -g X="| xclip -selection clipboard"
alias -g TM="| tmux load-buffer -- -"
alias -g B="&|"
alias -g HL="--help"
alias -g MM="2>&1 | most"
@ -682,7 +684,8 @@ function tradfr()
# Traduire du français à l'anglais avec Gogole:
function traden()
{
wget -U "Mozilla/5.0" -qO - "http://translate.google.com/translate_a/t?client=t&text=${*}&sl=fr&tl=en" | sed 's/\[\[\[\"//' | cut -d \" -f 1
wget -qO- "http://ajax.googleapis.com/ajax/services/language/translate?v=2&q=$1&langpair=$2|${3:-en}" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/'
#wget -U "Mozilla/5.0" -qO - "http://translate.google.com/translate_a/t?client=t&text=${*}&sl=fr&tl=en" | sed 's/\[\[\[\"//' | cut -d \" -f 1
}
# Traduire le texte (1er argument) de la langue source (2nd argument) dans la langue de destination (3ème argument)