Let commands take over the terminal?
Opened this issue · 0 comments
dpercy commented
Is it possible to yield control of the terminal to each command when it runs? This would open up a bunch of new possibilities.
- Commands that use $EDITOR or $PAGER.
- From an
ls
view, you could bindvim $0
orless $0
to a key. The editor would take over the terminal temporarily; when you quit the editor you'd be back in the same lazycli session. - From the
git status
view, you could rungit commit
and let the commit-message editor take over temporarily. - From
git log
you could rungit show --patch
to preview a commit.
- From an
- Commands that prompt for a second argument.
- From
ls
, you could bindr
tomv $0 $(read)
. Then to renamefoo
tobar
you'd selectfoo
, and typer bar<enter>
. - Similarly, from
git branch
, you could bindgit branch mv $0 $(read)
.
- From
I'm not sure how this would be implemented, but it might be similar to vim's :!
command. As a (contrived) example, when you run :!htop
, htop takes over the terminal; when you quit htop you end up back in vim again.