Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add short version of help, as in quit #10055

Merged
merged 2 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions core/base/src/TApplication.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ void TApplication::OpenReferenceGuideFor(const TString &strippedClass)
////////////////////////////////////////////////////////////////////////////////
/// The function lists useful commands (".help") or opens the online reference
/// guide, generated with Doxygen (".help scope" or ".help scope::member").
///
/// \note You can use ".?" as the short version of ".help"
/// \param[in] line command from the command line

void TApplication::Help(const char *line)
Expand All @@ -1049,12 +1049,12 @@ void TApplication::Help(const char *line)
if ((strippedCommand == ".help") || (strippedCommand == ".?")) {
gInterpreter->ProcessLine(line);
Printf("\nROOT special commands.");
Printf("==========================================================================");
Printf("==============================================================================");
Printf(" .pwd : show current directory, pad and style");
Printf(" .ls : list contents of current directory");
Printf(" .which [file] : shows path of macro file");
Printf(" .help Class : opens the reference guide for that class");
Printf(" .help Class::Member : opens the reference guide for function/member");
Printf(" .help Class : opens the reference guide for that class (or .?)");
Printf(" .help Class::Member : opens the reference guide for function/member (or .?)");
return;
} else {
// If the user wants to use the extended ".help scopeName" command to access
Expand Down Expand Up @@ -1437,7 +1437,7 @@ Longptr_t TApplication::ProcessLine(const char *line, Bool_t sync, Int_t *err)
}

if (!strcmp(line, ".reset")) {
// Do nothing, .reset disabled in CINT because too many side effects
// Do nothing, .reset disabled in Cling because too many side effects
Printf("*** .reset not allowed, please use gROOT->Reset() ***");
return 0;

Expand Down
2 changes: 1 addition & 1 deletion core/rint/src/TRint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void TRint::PrintLogo(Bool_t lite)
}
lines.emplace_back(TString::Format("With %s %%s",
gSystem->GetBuildCompilerVersionStr()));
lines.emplace_back(TString("Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'%s"));
lines.emplace_back(TString("Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'%s"));

// Find the longest line and its length:
auto itLongest = std::max_element(lines.begin(), lines.end(),
Expand Down
9 changes: 4 additions & 5 deletions documentation/primer/ROOT_as_calculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ root [1] .<command>

This is a selection of the most common commands.

- **quit root**, simply type `.q`
- **quit root**, simply type `.q` or `.quit` or `.exit`

- obtain a **list of commands**, use `.?`
- obtain the full **list of commands**, use `.?` or `.help`

- **access the shell** of the operating system, type `.!<OS_command>`;
try, e.g. `.!ls` or `.!pwd`
Expand All @@ -243,8 +243,6 @@ This is a selection of the most common commands.
in order to obtain better performance or to get nearer to the
production environment.

Use `.help` at the prompt to inspect the full list.

## Plotting Measurements ##

To display measurements in ROOT, including errors, there exists a
Expand Down Expand Up @@ -517,4 +515,5 @@ features of ROOT.
***Please move on to become an expert!***

[^2]: All ROOT classes' names start with the letter T. A notable exception is
RooFit. In this context all classes' names are of the form Roo*.
RooFit. In this context all classes' names are of the form Roo*. Starting with
ROOT7, all names start with and R.
2 changes: 1 addition & 1 deletion interpreter/cling/lib/MetaProcessor/MetaSema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ namespace cling {
"\t\t\t\t 'decl' dump ast declarations\n"
"\t\t\t\t 'undo' show undo stack\n"
"\n"
" " << metaString << "help\t\t\t- Shows this information\n"
" " << metaString << "help\t\t\t- Shows this information (also .?)\n"
"\n"
" " << metaString << "q\t\t\t\t- Exit the program\n"
"\n";
Expand Down