… | |
… | |
66 | contain at least one pair of capturing parentheses, which will be used for |
66 | contain at least one pair of capturing parentheses, which will be used for |
67 | the match. For example, the followign adds a regex that matches everything |
67 | the match. For example, the followign adds a regex that matches everything |
68 | between two vertical bars: |
68 | between two vertical bars: |
69 | |
69 | |
70 | URxvt.selection.pattern-0: \\|([^|]+)\\| |
70 | URxvt.selection.pattern-0: \\|([^|]+)\\| |
|
|
71 | |
|
|
72 | Another example: Programs I use often output "absolute path: " at the |
|
|
73 | beginning of a line when they process multiple files. The following |
|
|
74 | pattern matches the filename (note, there is a single space at the very |
|
|
75 | end): |
|
|
76 | |
|
|
77 | URxvt.selection.pattern-0: ^(/[^:]+):\ |
71 | |
78 | |
72 | You can look at the source of the selection extension to see more |
79 | You can look at the source of the selection extension to see more |
73 | interesting uses, such as parsing a line from beginning to end. |
80 | interesting uses, such as parsing a line from beginning to end. |
74 | |
81 | |
75 | This extension also offers following bindable keyboard commands: |
82 | This extension also offers following bindable keyboard commands: |
… | |
… | |
363 | Called at the very end of initialisation of a new terminal, just before |
370 | Called at the very end of initialisation of a new terminal, just before |
364 | trying to map (display) the toplevel and returning to the mainloop. |
371 | trying to map (display) the toplevel and returning to the mainloop. |
365 | |
372 | |
366 | =item on_destroy $term |
373 | =item on_destroy $term |
367 | |
374 | |
368 | Called whenever something tries to destroy terminal, before doing anything |
375 | Called whenever something tries to destroy terminal, when the terminal is |
369 | yet. If this hook returns true, then destruction is skipped, but this is |
376 | still fully functional (not for long, though). |
370 | rarely a good idea. |
|
|
371 | |
377 | |
372 | =item on_reset $term |
378 | =item on_reset $term |
373 | |
379 | |
374 | Called after the screen is "reset" for any reason, such as resizing or |
380 | Called after the screen is "reset" for any reason, such as resizing or |
375 | control sequences. Here is where you can react on changes to size-related |
381 | control sequences. Here is where you can react on changes to size-related |