Skip to content
Snippets Groups Projects

set the command name in the examples without full path

Merged Ashwin Kumar Karnad requested to merge simplify-examples-in-help into main
1 file
+ 5
4
Compare changes
  • Side-by-side
  • Inline
@@ -27,6 +27,7 @@ except ModuleNotFoundError:
@@ -27,6 +27,7 @@ except ModuleNotFoundError:
else:
else:
rich_available = True
rich_available = True
 
command_name = Path(sys.argv[0]).name
about_intro = f"""
about_intro = f"""
Build software as on MPSD HPC.
Build software as on MPSD HPC.
@@ -45,7 +46,7 @@ Build software as on MPSD HPC.
@@ -45,7 +46,7 @@ Build software as on MPSD HPC.
Command line usage:
Command line usage:
$> {sys.argv[0]}
$> {command_name}
"""
"""
@@ -58,15 +59,15 @@ Examples:
@@ -58,15 +59,15 @@ Examples:
1. Query what package sets and toolchains are available for installation in
1. Query what package sets and toolchains are available for installation in
release dev-23a
release dev-23a
$> {sys.argv[0]} available dev-23a
$> {command_name} available dev-23a
2. Install foss2022a-serial toolchain from the dev-23a release
2. Install foss2022a-serial toolchain from the dev-23a release
$> {sys.argv[0]} install dev-23a foss2022a-serial
$> {command_name} install dev-23a foss2022a-serial
3. Check what package sets and toolchains are installed from release dev-23a
3. Check what package sets and toolchains are installed from release dev-23a
$> {sys.argv[0]} status dev-23a
$> {command_name} status dev-23a
The `status` command also displays the `module use` command needed to load
The `status` command also displays the `module use` command needed to load
the created modules.
the created modules.
Loading