From bb2ef487d7244e12dfa5c65795d5ee89d0abe50b Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 18 Sep 2017 10:58:08 +0200 Subject: [PATCH] Allow to send command result to different clipboard/buffer. --- zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 47260a8..a21811b 100644 --- a/zshrc +++ b/zshrc @@ -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)