help + grep = awesome
Posted: Thu Apr 25, 2013 1:17 am
Please pardon the formatting, I started to post this on the in-game Request board but realized it's probably something that should be posted on the forums instead. Here goes:
I've been debating myself for weeks whether I wanted to actually submit
this, as it can certainly be seen as just laziness, but...
Every now and then I come across a really long help file I just can't
visually parse, or I'm in the middle of a scene and need to look up a small
detail in even a medium-sized help file, and this would be super helpful in
those and potentially other situations.
Basically it would do the equivalent of this:
help search term | grep another search term
For example, help match death xp shows one helpfile: help changes mar2011.
But in that file there are logs of 45 different changes. If I could do
something like help mar2011 | grep death xp it would give me just the one
matching line:
Line 10:
* Added Death XP to the staff XP command.
There are other cases where that one specific line may not be all the info
needed, but being able to see the one line would make it easier to find the
context in the original helpfile. For example, help timeline | grep murder
would match two lines:
Line 37:
Decembris - Cardinal Zinadya ab Tartaryn is murdered by mages.
Line 75:
begins to attack the populace, kidnapping and murdering many people. He is
Seeing the whole line lets me more easily find that part of the helpfile,
so I can then find out that Zinadya was killed in the year 352 SC, or that
it was specifically the Hillbeast that attacked the populace.
I don't know what to call the thing, since grep is pretty nerdy even
for a MUD crowd, so not everyone would know what that means. I started to
think something like helpline but then I wasn't sure how to separate
the helpfile keywords from the line search keywords... Maybe just adding
a pipe to the normal help command could do it?
help changes mar2011 | death xp
That way it's more clear that the keywords after "help" are to get the file,
and the keywords after the vertical pipe are to narrow down to the line. I
guess you then lose the ability to legitimately use a vertical pipe to match
a help title or keyword, but I would hope that's not a real problem!
I've been debating myself for weeks whether I wanted to actually submit
this, as it can certainly be seen as just laziness, but...
Every now and then I come across a really long help file I just can't
visually parse, or I'm in the middle of a scene and need to look up a small
detail in even a medium-sized help file, and this would be super helpful in
those and potentially other situations.
Basically it would do the equivalent of this:
help search term | grep another search term
For example, help match death xp shows one helpfile: help changes mar2011.
But in that file there are logs of 45 different changes. If I could do
something like help mar2011 | grep death xp it would give me just the one
matching line:
Line 10:
* Added Death XP to the staff XP command.
There are other cases where that one specific line may not be all the info
needed, but being able to see the one line would make it easier to find the
context in the original helpfile. For example, help timeline | grep murder
would match two lines:
Line 37:
Decembris - Cardinal Zinadya ab Tartaryn is murdered by mages.
Line 75:
begins to attack the populace, kidnapping and murdering many people. He is
Seeing the whole line lets me more easily find that part of the helpfile,
so I can then find out that Zinadya was killed in the year 352 SC, or that
it was specifically the Hillbeast that attacked the populace.
I don't know what to call the thing, since grep is pretty nerdy even
for a MUD crowd, so not everyone would know what that means. I started to
think something like helpline but then I wasn't sure how to separate
the helpfile keywords from the line search keywords... Maybe just adding
a pipe to the normal help command could do it?
help changes mar2011 | death xp
That way it's more clear that the keywords after "help" are to get the file,
and the keywords after the vertical pipe are to narrow down to the line. I
guess you then lose the ability to legitimately use a vertical pipe to match
a help title or keyword, but I would hope that's not a real problem!