Make pane contents reader configurable #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 withtac
(reversecat
, 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 usetac
instead ofcat
.