ankursinha.in/blog

neuroscience/fedora/musings

Fri 03 December 2010

irssi : quickly pasting an fpaste link to a channel

Posted by ankur in Tech (163 words, approximately a 1 minute read)

I recently posted mylist of irssi aliases that come handy on the fedora IRC channels. Today, I was experimenting and found something new. Suppose you head into #fedora, and ask for help. Someone asks you to fpaste something, lets say :

$ lsusb | fpaste

Now, instead of changing to another terminal tab, or another screen window to do this, all you need to do is this :

/exec -m #fedora lsusb | fpaste

Yes, that's it! And in #fedora, the resultis an awesome:

18:05 < FranciscoD> Uploading (0.7K)...
18:06 < FranciscoD> http://fpaste.org/WUxU/

Saves time and is more convenient. Cheers!

EDIT: Some more digging, and we have an improved command:

/exec -m #fedora echo -n "NICK: "; lsusb | fpaste 2>&1 | grep "fpaste"

This sends the link to the respective NICK, and only one line, the link, since it's been grepped.

Aliases for irssi :

/alias fedoraFpasteResult /exec -m #fedora echo -n "$0: "; $1- | fpaste 2>&1 | grep "fpaste"

/alias fedoraFpasteResultGeneral /exec -m $0 echo -n "$1: "; $2- | fpaste 2>&1 | grep "fpaste"

 
    
 
 

Comments