The help command displays a complete reference of all Nash commands, their options, and shell syntax. It provides quick access to command usage information directly from the command line.
The help command shows comprehensive documentation for Nash, including:
All available built-in commands with descriptions
Command-line options and flags
Shell syntax features (pipes, redirects, chaining, etc.)
Usage examples
Currently, the Nash help command displays all available commands and syntax in a single reference. Command-specific help may be added in future versions.
# Simple commandcmd arg# Pipe stdout to stdincmd | cmd# Redirect stdout (overwrite)cmd > file# Redirect stdout (append)cmd >> file# Read stdin from filecmd < file# Run second if first succeedscmd && cmd# Run second if first failscmd || cmd# Run both unconditionallycmd ; cmd# Subshell (isolated environment)( cmd )# Variable expansion$VAR ${VAR}# Command substitution$(cmd)# Quoting'text' "text"# Comments# comment
# Add help reference at top of scriptecho "#!/usr/bin/env nash" > script.shecho "# Run 'help' for command reference" >> script.shecho "" >> script.shecho "ls -la" >> script.sh