Closed etenim closed 3 years ago
Added by 798b0936465eba14bf7d51b2313764908876aa7a.
Maybe we could also pass some useful info to the script as command line parameters?
Added by 798b093.
Awesome! I can confirm it works on my end. I got the last url with this:
#!/bin/sh
ugrep -io "(http|https)://[a-z.\-/0-9a]*" < /dev/stdin | tail -n1 | wl-copy
Maybe we could also pass some useful info to the script as command line parameters?
Yes, good idea. Could be things like window title, application ID and the like. Maybe some info about the content being piped.
There's a lot of potential uses for this feature overall.
I've noticed that the last line of output in a wayst terminal doesn't get piped to the external program. At least not until another new line is output.
An example: cat the contents of a file, the last line of the file is not in the pipe data sent to the external program. Then simply pressing "enter" at the PS1 prompt will cause the final line of the file to be piped as well.
Using this in my config: extern-pipe = command:screen
Thank you for fixing the extern-pipe bug.
I think this can be closed, and rather re-opened later if something comes up.
You could pipe to a script that searches for text and displays the results in a launcher like wofi, letting you easily select between many matches.
As an example: