urxvt-selection(1)

πŸ’– NAME πŸ’–

selection β€” more intelligent selection. that's the whole name, and honestly? iconic. 🫢

✨ DESCRIPTION ✨

okay so bestie, this is urxvt-selection(1) from RXVT-UNICODE, and it's the manual page for the selection extension. it tries to be more intelligent when you extend selections β€” you know, double-click and further clicks β€” and it's lowkey serving genius energy πŸ’….

right now it tries to select words, urls and complete shell-quoted arguments. that's very convenient too, especially if your ls supports "--quoting-style=shell" β€” yes bestie, shell quoting matters, iykyk ✨.

a double-click usually selects the word under the cursor, and further clicks will enlarge the selection. simple, cute, effective πŸŽ€.

the selection works by trying to match a number of regexes and displaying them in increasing order of length. you can add your own regexes by specifying resources of the form:

URxvt.selection.pattern-0: perl-regex
URxvt.selection.pattern-1: perl-regex
...

the index number (0, 1...) must not have any holes β€” no gaps, no skipping, bestie, it's giving sequential only πŸ’€ β€” and each regex must contain at least one pair of capturing parentheses, which will be used for the match.

for example, this one adds a regex that matches everything between two vertical bars:

URxvt.selection.pattern-0: \\|([^|]+)\\|

another example: programs I use often output "absolute path: " at the beginning of a line when they process multiple files. the following pattern matches the filename β€” note, there is a single space at the very end, and yes that matters, don't let your editor eat it πŸ™ˆ:

URxvt.selection.pattern-0: ^(/[^:]+):\

you can peek at the source of the selection extension to see more interesting uses, such as parsing a line from beginning to end. very demure, very mindful, very regex 🧚.

it also serves up these actions:

  • rot13 β€” Rot-13 the selection when activated.

example:

URxvt.keysym.C-M-r: selection:rot13

made with πŸ’– from the urxvt-selection(1) manual, version 9.31, dated 2023-12-02 β€” bye bestie, go select something cute! 🫢

πŸ“¦ where this page comes from