> The sam window is not always responsive to commands. Under what specific 
> conditions is this the case?

I can think of a few cases:

* You issued an I/O command (shell, read file, write file, etc.) and
it's still in progress (there will always be output you can wait for
in these cases, e.g. the second '!' for shell commands). There's no
way I know of to kill an issued command from within sam (e.g. del key
doesn't work); if you launched something that's infinite looping or
the like you'd have to find it via ps and send a signal/note.
* You're entering commands on something other than the last line
("history" is editable, as in normal plan 9 terminals, which can be
particularly confusing in sam, as there's no prompt).
* You've started a compound command spanning multiple lines (e.g. with
{ } braces) and haven't completed it yet.

> is there a way to repeat the last entered command in sam without having to 
> snarf and paste? I know one can repeat the last search with //.

Not that I know of, sadly. Bare 's' to repeat is one of the things I
miss most about ed. Samterm's 'send' (send the highlighted text (or
the current snarf buffer) for execution) might be a slightly faster
idiom than snarf+paste+enter, though.

> In ed the "e" command allows one to switch files. It replaces the current 
> file with another. To add a file to the list in sam, one should use B not e. 
> Is that correct? I.e. it would seem "e" is allowed but not sam's natural way 
> of doing things?

B and b are both useful for this, yes. The former will load a new file
if that path isn't already in the menu, the latter will only switch to
already-loaded files.

'b' can be combined with X to good effect, in spite of that clearly
not being an anticipated case:
X/pathregex/b

will print "?blank expected" but still switch to the file matching
pathregex, so you don't need to type (or copy+paste) the full path.

- Silas

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T60b5c1929a63b077-Mf5cfe43f0a56bf959f4d436a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to