Transform escaped commands - %magic, !system, ?help + various autocalls.
(line)
| 265 | |
| 266 | @StatelessInputTransformer.wrap |
| 267 | def escaped_commands(line): |
| 268 | """Transform escaped commands - %magic, !system, ?help + various autocalls. |
| 269 | """ |
| 270 | if not line or line.isspace(): |
| 271 | return line |
| 272 | lineinf = LineInfo(line) |
| 273 | if lineinf.esc not in tr: |
| 274 | return line |
| 275 | |
| 276 | return tr[lineinf.esc](lineinf) |
| 277 | |
| 278 | _initial_space_re = re.compile(r'\s*') |
| 279 |