… | |
… | |
120 | different types of metadata. These comments are scanned whenever a |
120 | different types of metadata. These comments are scanned whenever a |
121 | terminal is created and are typically used to autoload extensions when |
121 | terminal is created and are typically used to autoload extensions when |
122 | their resources or command line parameters are used. |
122 | their resources or command line parameters are used. |
123 | |
123 | |
124 | Currently, it recognises these comments below. Individual components are |
124 | Currently, it recognises these comments below. Individual components are |
125 | separated by cololns (C<:>), and shoudl not contain colons themselves - |
125 | separated by colons (C<:>), and should not contain colons themselves - |
126 | there is also currently no escaping mechanism provided for this. |
126 | there is also currently no escaping mechanism provided for this. |
127 | |
127 | |
128 | =over |
128 | =over |
129 | |
129 | |
130 | =item #:META:RESOURCE:name:type:desc |
130 | =item #:META:RESOURCE:name:type:desc |
… | |
… | |
134 | or C<string>, and C<desc> is the resource description. |
134 | or C<string>, and C<desc> is the resource description. |
135 | |
135 | |
136 | The extension will be autoloaded when this resource is specified or used |
136 | The extension will be autoloaded when this resource is specified or used |
137 | as a command line parameter. |
137 | as a command line parameter. |
138 | |
138 | |
139 | Example: matcher provides the C<matcher.launcher> ressource by having this |
139 | Example: matcher provides the C<matcher.launcher> resource by having this |
140 | comment: |
140 | comment: |
141 | |
141 | |
142 | #:META:RESOURCE:%.launcher:string:default launcher command |
142 | #:META:RESOURCE:%.launcher:string:default launcher command |
143 | |
143 | |
144 | Example: load this extension when the C<-tr> command line option or |
144 | Example: load this extension when the C<-tr> command line option or |
… | |
… | |
154 | |
154 | |
155 | This will cause the extension to be autoloaded when the OSC sequence is |
155 | This will cause the extension to be autoloaded when the OSC sequence is |
156 | used for the first time. |
156 | used for the first time. |
157 | |
157 | |
158 | Note that autoloading carries some extra responsibilities with it: |
158 | Note that autoloading carries some extra responsibilities with it: |
159 | although the terminal cnanot really protect itself against malicious |
159 | although the terminal cannot really protect itself against malicious |
160 | sources of command sequences, therefore relying on the programs running |
160 | sources of command sequences, therefore relying on the programs running |
161 | I<inside> to sanitize data that they output, it is very common for |
161 | I<inside> to sanitize data that they output, it is very common for |
162 | programs to emit command sequences from untrusted sources. |
162 | programs to emit command sequences from untrusted sources. |
163 | |
163 | |
164 | While this means that extensions should, as a defense-in-depth mechanism, |
164 | While this means that extensions should, as a defense-in-depth mechanism, |
… | |
… | |
1202 | $proxy->enable ($name => $ref); |
1202 | $proxy->enable ($name => $ref); |
1203 | } |
1203 | } |
1204 | } |
1204 | } |
1205 | } |
1205 | } |
1206 | |
1206 | |
1207 | # map extension name to filesyystem path |
1207 | # map extension name to filesystem path |
1208 | sub extension_path { |
1208 | sub extension_path { |
1209 | (grep -f $_, map "$_/$_[1]", $_[0]->perl_libdirs)[0] |
1209 | (grep -f $_, map "$_/$_[1]", $_[0]->perl_libdirs)[0] |
1210 | } |
1210 | } |
1211 | |
1211 | |
1212 | # load an extension by name |
1212 | # load an extension by name |
… | |
… | |
2001 | where one character corresponds to one screen cell. See |
2001 | where one character corresponds to one screen cell. See |
2002 | C<< $term->ROW_t >> for details. |
2002 | C<< $term->ROW_t >> for details. |
2003 | |
2003 | |
2004 | =item $string = $term->special_decode $text |
2004 | =item $string = $term->special_decode $text |
2005 | |
2005 | |
2006 | Converts rxvt-unicodes text representation into a perl string. See |
2006 | Converts rxvt-unicode's text representation into a perl string. See |
2007 | C<< $term->ROW_t >> for details. |
2007 | C<< $term->ROW_t >> for details. |
2008 | |
2008 | |
2009 | =item $success = $term->grab_button ($button, $modifiermask[, $window = $term->vt]) |
2009 | =item $success = $term->grab_button ($button, $modifiermask[, $window = $term->vt]) |
2010 | |
2010 | |
2011 | =item $term->ungrab_button ($button, $modifiermask[, $window = $term->vt]) |
2011 | =item $term->ungrab_button ($button, $modifiermask[, $window = $term->vt]) |