Question / Get Available Commands
Get Available Commands
Retrieves a list of available CLI commands.
? ? #!/bin/bash
# Get Available Commands
? import subprocess
# Get Available Commands
# Make sure to replace <placeholders> with actual values
def run_command():
cmd = [
"question",
]
try:
print(f"Executing: {' '.join(cmd)}")
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
except FileNotFoundError:
print("Error: question not found. Please install it first.")
if __name__ == "__main__":
run_command() When To Use
During troubleshooting when command syntax is unknown.
Pro Tip
Utilize this command in conjunction with `?| help` in scripts for dynamic help retrieval.
Terminal Output
Expected runtime feedback
Available commands:
| Command | Description |
|-------------|---------------------------------|
| help | Show help information |
| version | Display the current version |
| status | Get the status of the service |
| config | View or modify configuration |
| diagnostics | Run diagnostics and check logs | Anatomy of Output
Understanding the result
Available commands: alias, show, configure, debug, exit Commands List Enumerates all available commands.
Use '?' at any prompt for syntax assistance. Syntax Help Dynamic contextual help on command usage.
Power User Variants
Optimized versions
question ? Retrieve context-sensitive help based on current mode.
question alias ? List commands related to aliases.
Troubleshooting
Common pitfalls
% Invalid input detected at '^' marker.
Solution: Check command syntax or spelling.
% Ambiguous command: "question"
Solution: Specify the complete command name.
% Command not found: 'question'
Solution: Ensure the command is supported on the current device.
Command Breakdown
What each part is doing
-
? - Base Command
- The executable that performs this operation. Here it runs Question before the shell applies any redirect operators.
How To Run
Execution path
- Step 1
Run the command: ?
- Step 2
Check the output to view available commands and their descriptions.
Alternative Approaches
Comparable commands in other tools
Alternative documentation tools for the same job.