TTYtter is a Linux command-line app for Twitter. I use it over SSH while at the office, so (as far as I can tell) I cannot open links into a GUI browser from within the app.

In TTYtter, one types /url followed by an alphanumeric string to open the first link mentioned in a tweet. By default, /url is set to echo %U which just "prints" the URL out in the terminal. This is not very useful. One can set the value by typing /set urlopen followed by the app in which one wants to view the URL. I have been typing /set urlopen lynx --accept-all-cookies %U at the beginning of every session, but this gets tiresome.

I know nothing of PERL, but I know that this app is just one big executable text file. So I just opened it in a text editor, searched for urlopen and changed

$urlopen ||= 'echo %U';


$urlopen ||= 'lynx --accept-all-cookies %U';

Now I can view the link in the Lynx browser (and without having to accept cookies each and every time) without having to set the variable again.

Want to comment? The permalink for this post is

10/14/14; 12:38:34 PM

Last built: Tue, Mar 31, 2015 at 2:04 PM

By Jeffrey Kishner, Tuesday, October 14, 2014 at 12:38 PM.