command output history ideas

4 views
Skip to first unread message

Hamish

unread,
Feb 29, 2008, 10:44:02 AM2/29/08
to Hotwire Shell
Was thinking a bit more about the way the command history works, and
I've had a number of ideas, so I thought I'd post them and up and see
what folk think. Note there is an issue open about some of this
already:
http://code.google.com/p/hotwire-shell/issues/detail?id=83

I'll start with some thoughts about how gnome-terminal works. Some
observations

* if the results of the last few commands is short, I can see quite a
few command results at once.
* there is a fixed buffer size (which can be altered in the
preferences) that sets the number of lines saved before results are
discarded.

So my expectations of a terminal replacement are partly set by the
above properties. With the timeout it seems a bit random when results
disappears when you are used to a buffer. To translate this into
hotwire design, I would make the default be that

* there is a value in the preferences that sets the number of
(finished) results that will be kept. There is a default value (of
say 10, so it works out of the box) but the user can change that.

* the default way of displaying results would be to show all the
results - each result would have its own box, with the command run at
the top of the box (in bold on a darker background), a line beneath
it, and then the output of the command. The boxes would appear in the
order run. That way I can see the result of the last few commands (if
the output is short).

* You can collapse (and expand) individual results, or collapse all,
or expand all. Think of the gmail interface for viewing a thread of
messages. Obviously we would have to allow for both mouse and
keyboard shortcuts for doing this. (Which makes me think of something
like vi command mode, removing the focus from the input box and using
j and k to go up and down the commands, opening as you go, maybe with
n and p to do next and previous without opening, but maybe I just use
google reader too much. One step at a time ...)

In addition I like the idea of

* being able to pin results (so that they don't expire)
* naming results (so that they can be filtered as "current" can be)
* clearing individual (or all) results

Hamish

unread,
Mar 2, 2008, 5:54:04 PM3/2/08
to Hotwire Shell
The keyboard junkie in me has been reorganising these thoughts
slightly. As to where the keyboard input goes, I see there would be
several modes (most of these already exist)

Normal - type into the text box
Insert - enter text to interact with the program (currently enter with
Ctrl-I, leave with Esc)
Search - enter text to search within a result (currently enter with
Ctrl-S, leave with Esc)
Navigation - (new) navigate the results of previous commands.
Select(?) - use cursors within the result and select text by holding
down shift and using the cursor keys (just an idea, not sure how good
it is)

Things you could do in Navigation mode ------------- keys used
(inspired by less, vim etc)

Next / previous result ------------------------------ j k
pin / unpin ------------------------------ p u
drop or delete a result ----------------------------- d
expand / collapse result -------------------------- x c
expand / collapse all results -------------------- X C
search within result ----------------------------- /
stop or kill ???
pause / restart ???


What do people think? Would the Navigation mode be useful, or is it
overkill?

One other thought, it might be interesting to have the first line of
the result visible when the result has been collapsed ...

Hamish

unread,
Apr 15, 2008, 12:12:02 PM4/15/08
to Hotwire Shell
A few more ideas on this general theme. Not sure how good they are
but thought I'd share them ...

For giving input to a program, as well as hitting Ctrl-I, it might be
useful to type "in ..." in the normal text area and have that sent
through to stdin to the application running.

And moving on from that you could use commands to control the GUI in a
number of ways. Some might prefer working that way, and it could be
useful for writing scripts (might have to think about how they are
accessed in scripts, import hotwire-gui-cmds ???). So some possible
commands might be

* ov-mode - go to overview mode
* in-mode - go to input mode (think scripts that want user input,
block until user presses enter ...)
* up - go up one command output
* down - go down one command output
...

Reply all
Reply to author
Forward
0 new messages