Page 1 of 2
How to prevent input command echo with alias?
Posted: Mon Apr 27, 2020 8:53 am
by Laps
I have a very simple alias that expands
sc to
scan (screenshot below).
When I submit the command
sc via the command line, it echoes both the input command
sc to the main output, as well as the command to which the alias resolved - so when I enter
sc I see:
sc
scan
... however, I'd like to prevent that first echo and
only display the fully-resolved alias line (the second one) - so when I enter
sc I see:
scan
It this possible today?
----
SCREENSHOT:
Re: How to prevent input command echo with alias?
Posted: Tue Apr 28, 2020 6:41 am
by Vadi
Yes it is, instead of command put the following into the code box below:
Re: How to prevent input command echo with alias?
Posted: Tue Apr 28, 2020 9:23 am
by Laps
Vadi wrote: ↑Tue Apr 28, 2020 6:41 am
Yes it is, instead of command put the following into the code box below:
Ah, close one... but this approach still echos the
input command, but preference is to instead echo only the
resolved command, post-alias expansion.
Re: How to prevent input command echo with alias?
Posted: Tue Apr 28, 2020 9:33 am
by Vadi
For that you can turn off "Show the text you sent" in the Input Line settings.
Re: How to prevent input command echo with alias?
Posted: Tue Apr 28, 2020 12:27 pm
by SlySven
"By the way" and "for your information" the option to show what you typed in, i.e. the "Show the text you sent" option is also forcibly switched off when the MUD Server asks to take over the echoing of what you send to it (and Mudlet will automatically accept that).
This is the convention during the time that you are sending things like, e.g., a password, under those circumstances the Server doesn't actually do that echoing which has the end result of not showing your password on the main screen (or in the logs of the session)!
Re: How to prevent input command echo with alias?
Posted: Wed Apr 29, 2020 8:00 am
by Laps
Vadi wrote: ↑Tue Apr 28, 2020 9:33 am
For that you can turn off "Show the text you sent" in the Input Line settings.
I'm afraid this isn't quite what I'm hoping for either
While this does cause the
input command to be hidden, it also hides the
post-alias-expansion command to be hidden -- I would like only the latter (even when there's no alias involved).
I.e., I'd like to see precisely what gets sent to the mud after passing through my settings, regardless of what I actually typed, without also seeing what I actually typed.
Re: How to prevent input command echo with alias?
Posted: Wed Apr 29, 2020 8:12 am
by Vadi
Try send("scan", true) in combination with that setting.
Re: How to prevent input command echo with alias?
Posted: Thu Apr 30, 2020 5:56 am
by Laps
Vadi wrote: ↑Wed Apr 29, 2020 8:12 am
Try send("scan", true) in combination with that setting.
Disabling the "Show the text you sent" setting takes precedence over the
true passed to
send, and nothing is displayed when I enter a command. That said, even if the
true took precedence, it would only behave as desired for commands that pass through aliases - I believe plain commands would still remain hidden.
Re: How to prevent input command echo with alias?
Posted: Thu Apr 30, 2020 8:02 am
by Vadi
That combination isn't possible then, sorry!
Re: How to prevent input command echo with alias?
Posted: Thu Apr 30, 2020 9:30 am
by Laps
Vadi wrote: ↑Thu Apr 30, 2020 8:02 am
That combination isn't possible then, sorry!
Thanks for trying! Would this make a reasonable feature request? If so, how would I go about submitting it?