retro-edit: add commands for running program, using shell, using retro-describe
FossilOrigin-Name: 085d37058e292c8e51cae21565ba7f025101b90c1c172a5d2529dd9b542c3a22
This commit is contained in:
parent
a7f0c3a8a7
commit
0cb88f9163
1 changed files with 14 additions and 0 deletions
|
@ -163,6 +163,8 @@ In general, each command is intended to do a single task.
|
||||||
| , | | display all lines in the file |
|
| , | | display all lines in the file |
|
||||||
| # | | toggle display of line numbers |
|
| # | | toggle display of line numbers |
|
||||||
| / | | search for text; display matching lines |
|
| / | | search for text; display matching lines |
|
||||||
|
| ; | | save, then run file via retro |
|
||||||
|
| ; | text | save, then run text as a shell command |
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
{{
|
{{
|
||||||
|
@ -219,6 +221,18 @@ In general, each command is intended to do a single task.
|
||||||
---reveal---
|
---reveal---
|
||||||
:cmd:W [ @Lines [ write-line nl ] indexed-times ] with-file ;
|
:cmd:W [ @Lines [ write-line nl ] indexed-times ] with-file ;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
:cmd:;
|
||||||
|
@Input dup s:length n:zero?
|
||||||
|
[ drop #0 script:get-argument 'retro_%s s:format ] if unix:system ;
|
||||||
|
|
||||||
|
&cmd:; $; ed:register-command
|
||||||
|
|
||||||
|
:cmd:?
|
||||||
|
@Input s:length n:-zero?
|
||||||
|
[ @Input 'retro-describe_%s s:format unix:system ] if ;
|
||||||
|
|
||||||
|
&cmd:? $? ed:register-command
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
## Register The Commands
|
## Register The Commands
|
||||||
|
|
Loading…
Reference in a new issue