|
BashSpark
|
Built-in command that prints all arguments to stdout. More...
#include <command.h>


Public Member Functions | |
| command_echo () | |
| Constructs the command. | |
| shell_status | run (const std::span< const std::string > &vArgs, shell_session &oSession) const override |
| Prints all arguments to stdout. | |
Public Member Functions inherited from bs::command | |
| command (std::string sName) | |
| Construct a command with a given name. | |
| virtual | ~command ()=default |
| Virtual destructor. | |
| std::string | get_name () const |
| Get the command name (copy). | |
| const std::string & | get_name_ref () const noexcept |
| Get the command name (reference). | |
Built-in command that prints all arguments to stdout.
Syntax: echo [argument]?+ (with new line)
Syntax: echo -n [argument]?+ (without new line)
|
overridevirtual |
Prints all arguments to stdout.
Arguments are printed separated by a single space. Supports any number of arguments. No formatting or escape sequences are processed.
Option -n as first parameter disables '
' at the end of output.
| vArgs | Arguments for the command. |
| oSession | The shell session context. |
Implements bs::command.