Command Examples¶
The command examples component displays terminal commands with proper and elegant syntax highlighting in addition to formatting.
Basic Command¶
$
python phantom_e2e_modular.py --module deployment_test
Multi-line Command¶
For longer commands that span multiple lines, use line continuation:
$
docker run -it \
-v $(pwd):/app \
-e DO_API_TOKEN=$DO_API_TOKEN \
phantom/e2e-runner
Different Command Types¶
You can customize the component for different command types:
Root User¶
#
apt-get update && apt-get upgrade -y
PowerShell¶
PS>
Get-Process | Where-Object {$_.CPU -gt 100}
Custom Prompt¶
user@host:~$
ls -la /var/log/
Usage Tips¶
- Keep it Simple: Use the basic
$prompt for most examples - Line Breaks: Use
\for line continuation in long commands - Syntax Highlighting: For more complex scripts, consider using code blocks with syntax highlighting
- Copy-Friendly: The command text is easily selectable for copying
Alternative: Code Blocks¶
For scripts or multiple commands, standard code blocks might be more appropriate: