tmux-plugins / tmux-urlview

Quickly open any url on your terminal window!
MIT License
262 stars 32 forks source link

Make pane contents reader configurable #10

Open pigmonkey opened 8 years ago

pigmonkey commented 8 years ago

This changes the plugin so that the contents of the pane are read using an optionally configurable program. The output of the reader is then piped to the URL extractor. The reader defaults to cat, which means the default behaviour ends up being exactly the same as what users are currently used to.

Currently this plugin passes the URLs to urlview/extract_url in the order they appear in the pane. Most of the time the URL I want is at the bottom of the pane (ie, the most recent). I want to reverse the order in which the contents of the pane are sent to the extractor, so I don't have to scroll (as much) in urlview. This can be done by reading the saved pane with tac (reverse cat, part of coreutils) and piping that to the url extractor. With this change, I can add an option to my ~/.tmux.conf to make the plugin use tac instead of cat.

pigmonkey commented 8 years ago

Any chance of getting this merged?