Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'repeat' last command

13 views
Skip to first unread message

Garry Moorer

unread,
Oct 14, 2009, 7:26:22 PM10/14/09
to
Ahoy gods and fellow petty dictators,

Is it possible to implement a 'repeat' previous command(s) into the
standard code/client, similar to the one in winace?

What I mean is say I'm doing a 'fire sect x,x x,x' or whatever.
Instead of having to type it out again numerous times until the sector
is almost dietied, or paste it, etc., what if I could just do:

'repeat' to execute the previous command, or 'repeat 1', 'repeat 2',
'repeat n...') or something like that (tie it fn keys?)? Would be
quite helpful. Mebbe this already exists and I just don't know about
it?

Ciao,

=GM=

Gemini

unread,
Oct 14, 2009, 7:35:25 PM10/14/09
to

If you're using the console, simply press the "UP" arrow - should do the
trick; although doesn't seem to work on *my* server. Hm...

Gemini

Garry Moorer

unread,
Oct 14, 2009, 9:52:44 PM10/14/09
to

Up arrow never seems to work in game for me on dos/winblows or *nix.

Gemini

unread,
Oct 14, 2009, 11:36:45 PM10/14/09
to

I'm having the same issue - but I know it *used* to work. I wonder if
something changed? I get `^[[A` now. I think its some kind of character
encoding issue - except it works in *nix - just not in the empire client...

]g[

Message has been deleted

Gemini

unread,
Oct 15, 2009, 10:07:44 AM10/15/09
to
On 2009-10-15, Markus Armbruster <arm...@pond.sub.org> wrote:
> Line editing and command history are client-specific.
>
> empire-client does nothing in particular there, leaving it to the OS.
> Unix line discipline provides simple line editing and no history. I
> don't know about Windows.

What does that mean, Unix line discipline provides simple line editing
and no history?

> I've played with hooking up GNU readline and history, but it's not quite
> working yet. lafe got that. But it does funny things with quotes and
> such, which can be inconvenient at times.

I could have *sworn* I've used the up arrow in *nix empire client...hmmm...
it works in Whindoze...

Memory getting so much worse over the years...

]G[

Gemini

unread,
Oct 15, 2009, 10:32:00 AM10/15/09
to

Depending on your version/patch level of Window$, the up arrow should work.
Try going to a command prompt and type something like `dir`. After you hit enter,
pressing the up arrow should recall that command - if not, then you may need your
Windows patched - I'm not sure when it occurred that Micro$oft (Unless you're pre XP)
implemented this most wonderful *nux feature, but it may have been SP? Dunno. Pretty
sure Vista has it "out-of-the-box".

Anyone else have any ideas?

]G[
P.S. LONGTERM FULL FORMAL GAME PLEASE! Anyone? ANYONE?!?! Please? :D

Message has been deleted

Gemini

unread,
Oct 15, 2009, 12:55:46 PM10/15/09
to
On 2009-10-15, Markus Armbruster <arm...@pond.sub.org> wrote:
> Gemini <sco...@websagacity.com> writes:
>
>> On 2009-10-15, Markus Armbruster <arm...@pond.sub.org> wrote:
> [...]

>>> Line editing and command history are client-specific.
>>>
>>> empire-client does nothing in particular there, leaving it to the OS.
>>> Unix line discipline provides simple line editing and no history. I
>>> don't know about Windows.
>>
>> What does that mean, Unix line discipline provides simple line editing
>> and no history?
>
> You get a key to end the line, one to delete one character to the left,
> one to throw away the line and start over, one for end-of-file, one to
> interrupt the process, and one to kill the process.
>
> There's no way to access previous lines (history).
>
> [...]

Must be a *nix flavor thing. Every version I've used has history; unless
I'm missing something in you're meaning.
I use HP-UX at work, and Esc-k gives me access to history - every time I
hit `k` it goes back another line. I have a shell account on a system
running FreeBSD where the `up` arrow gives history; same thing with any
flavor of Linux I've used - up and down arrowns cycle through history.

Gemini ]G[

Message has been deleted

Gemini

unread,
Oct 15, 2009, 1:23:56 PM10/15/09
to
> No, that's the application program (most likely your shell), not the
> line discipline.

See - I told you I was missing something! ;)

Its a bit misleading b/c there are other apps that perform the same
line recall - didn't realize that was an app thing.

]G[

Garry Moorer

unread,
Oct 15, 2009, 3:20:38 PM10/15/09
to

I mean in game, "inside" the client.

Gemini

unread,
Oct 15, 2009, 3:30:47 PM10/15/09
to

So do I. When I run the empire client in a Winblows command prompt, I'm able to use
the up and down arrows to cycle through the last empire commands I've issued.

Martin Neitzel

unread,
Oct 15, 2009, 9:17:15 PM10/15/09
to
> Is it possible to implement a 'repeat' previous command(s) into the
> standard code/client, similar to the one in winace?

I use the the standard Unix empire-client. It has no command line
editing or history itself. That's way do run it directly but under
control of one of various wrapper programs which provide these
features. There are several to choose from, though none is standard
on any Unix. Search for one or more of the following programs in
whatever "add-on package system" is used on your Unix flavour:

rlwrap (a "readline" wrapper quite common with Linux distributions)
ile (Input Line Editor)
fep (Front End Processor)
rk (Reactive Keyboard, this builds a model of the command
sequences you typically use and tries to assist you by
_predicting_ what you might enter as your next characters,
words, or commands -- very smart)

I use rlwrap on the Debian Linux system I empire on, and ile on my
FreeBSD system -- I found those in the respective package collections,
i.e. simply installable via pkg_add / apt.

Such a thing is an absolute must-have, I'd say. Exploring an island is
much less of a drag if you can use command line recall for settling on
a new island with

exp c -23,4 uuj
exp c -23,4 uujj
exp c -23,4 uujju
...

Another thing which bugged me to no end was having to type out
"| less" after almost every second command, most notably "info",
"census/reso/com", "map *" and "news". I hacked my empire-client
so that it remembers the last pipe command and reuses that when you
use a lone "|" after your empire command.

I'll send the trivial patch to this newsgroup this weekend or so.

Martin NightCell

Gemini

unread,
Oct 16, 2009, 10:57:17 AM10/16/09
to
On 2009-10-16, Martin Neitzel <nei...@marshlabs.gaertner.de> wrote:
>> Is it possible to implement a 'repeat' previous command(s) into the
>> standard code/client, similar to the one in winace?
[snip]

> on any Unix. Search for one or more of the following programs in
> whatever "add-on package system" is used on your Unix flavour:
>
> rlwrap (a "readline" wrapper quite common with Linux distributions)
> ile (Input Line Editor)
> fep (Front End Processor)
> rk (Reactive Keyboard, this builds a model of the command
> sequences you typically use and tries to assist you by
> _predicting_ what you might enter as your next characters,
> words, or commands -- very smart)
>
[snip]
> Martin NightCell

What great information, Martin! I've used *nix for years and knew not
of these (I guess it never really came up).
I used rlwrap with empire and *bam* I now have history!!

AND I must be a real doof, b/c I didn't know you could pipe commands
in the empire client.

Thanks again!
Scott C. Zielinski
]G[

rkoen...@yahoo.ca

unread,
Oct 16, 2009, 10:56:13 PM10/16/09
to
> So do I. When I run the empire client in a Winblows command prompt, I'm able to use
> the up and down arrows to cycle through the last empire commands I've issued.
>
This does work for me as well but it is not implemented within empire
client code.

I believe it comes from the fact we call the Console Read functions in
the Window's version of the empire client so the history support comes
from the library call. I believe it origins are in the DOSKEY TSR
program.

Ron K.

0 new messages