Page 1 of 1

Unix like Alias command

Posted: Mon Dec 21, 2020 7:55 pm
by Hyla
Hello,

I'm new to Mudlet and have been looking around for something I think I would like to have. In the Mudlet Command Line I would like to do something similar to a Unix like alias command and also a grep like command.

Similar to the Unix `alias` command

Code: Select all

alias
Similar to the Unix `alias` command with a `grep`.

Code: Select all

alias | grep -i fireball
Being new to Mudlet I imported a package that seems to be widely used for the Mud I'm playing (Toril). The package I've imported has a large number of Alias', Triggers, etc already defined. I know I can go into the UI and look to see if an alias is defined and what it does, but I'd prefer to do it from the Mudlet Command Line.

If possible, please let me know if there is something already defined (I've been looking for a while already) or if this is something I could write a function/script for.

Please let me know if you have any questions.

Cheers,
Hyla

Re: Unix like Alias command

Posted: Tue Jan 05, 2021 12:36 pm
by Vadi
Hi,

There's no such functionality at the moment. While you can search if a particular alias exists with https://wiki.mudlet.org/w/Manual:Lua_Functions#exists, you can't get a listing of all aliases.

If you'd like, you can create all your aliases yourself with tempAliases and then you could have a text listing of them all: https://wiki.mudlet.org/w/Manual:Lua_Fu ... #tempAlias

Topic moved from Tips & Tricks to help because this is a help question, hope that's OK with you

Re: Unix like Alias command

Posted: Fri Jan 29, 2021 2:59 pm
by Hyla
Hi Vadi,

Thank you for the reply. I've tried using the exists function and it's helping. It may be overkill now that I'm getting more familiar with the package I'm using but I'm looking into creating a list of Aliases and Triggers from the package xml file.

Thank you for your help.

Cheers,
Hyla