mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
shoe: don't auto-run discontinuous inputs
Previously, up-arrowing into (or otherwise retrieving) a command from history that automatically runs on-input would directly run the command again, preventing the user from up-arrowing past the auto-run command into further history. With this change, shoe detects discontinuous inputs (sole's `%set` edit), and refuses to auto-run the parsed command in those cases.
This commit is contained in:
parent
106a714fb5
commit
7977dcfec0
@ -243,7 +243,10 @@
|
||||
%+ rose (tufa buf.cli-state)
|
||||
(command-parser:og sole-id)
|
||||
?: ?=(%& -.res)
|
||||
?. &(?=(^ p.res) run.u.p.res)
|
||||
:: only auto-run eligible commands if they were typed out
|
||||
:: (that is, not retrieved from command history)
|
||||
::
|
||||
?. &(?=(^ p.res) run.u.p.res !?=(%set -.ted.sole-change))
|
||||
[[~ cli-state] shoe]
|
||||
(run-command cmd.u.p.res)
|
||||
:_ shoe
|
||||
|
Loading…
Reference in New Issue
Block a user