[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: How to link the help file for a command to its immediateversion (or generally add aliases)
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: How to link the help file for a command to its immediateversion (or generally add aliases)
Date
Mon, 29 Sep 2008 11:57:11 -0500
Spelling out a point made by Sergiy Radyakin:
Suppose you write foobar.ado and want Stata to recognise
foo
foob
fooba
as abbreviations. The slow but sure way to do this is by wrapper files
---- foo.ado
program foo
foobar `0'
end
----
---- foob.ado
program foob
foobar `0'
end
----
---- fooba.ado
program fooba
foobar `0'
end
----
In other words, it is easy, if a little tedious. `0' is the way to echo
whatever followed the command name to the command being called.
It would be good practice to include a -version- statement in each program.
However, if any of the abbreviations are official Stata commands, or
abbreviations thereof, you will get them instead, unless in some cases
you mess with -adopath- (which is emphatically not recommended).
Nick
[email protected]
Eva Poen wrote:
Is it possible, for a user written command, to link the help file for
-command- to -commandi-? I.e., when typing -help commandi-, what
should show up is the help file for -command-, because it's all
documented in one file.
I came across the *help_alias.maint files in the Stata installation,
which I think do the job for Stata's official commands. I can't see a
way to add aliases (any, really, also abbreviations) for non-official
commands.
I'm forgetful with options, so I get to call the help files for my own
programs from time to time. Combined with my habit of inventing long,
akward names for programs, this is a lot of typing...
Eva
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |