[−][src]Macro crossterm::execute
Execute one or more command(s)
Parameters
-
Crossterm will write the ANSI escape codes to this given. (A flush will be done)
-
Give one or more commands that you want to execute
Example
use std::io::Write; use crossterm::{execute, Output}; // will be executed directly execute!(std::io::stdout(), Output("foo".to_string())); // will be executed directly execute!(std::io::stdout(), Output("foo".to_string()), Output("bar".to_string()));
Remarks
- In the case of UNIX and windows 10, ANSI codes are written to the given 'writer'.
- In case of Windows versions lower than 10, a direct WinApi call will be made.
This is happening because Windows versions lower then 10 do not support ANSI codes, and thus they can't be written to the given buffer.
Because of that there is no difference between
execute
andqueue
for those windows versions.