mirror of
https://github.com/GothenburgBitFactory/taskshell.git
synced 2025-07-29 00:53:26 +02:00
Shell: Implemented the 'exec' (or '!') command
This commit is contained in:
parent
d3410d8dcd
commit
766e16d22a
4 changed files with 17 additions and 13 deletions
|
@ -27,16 +27,20 @@
|
|||
#include <cmake.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
#include <text.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int cmdShell ()
|
||||
int cmdShell (const std::vector <std::string>& args)
|
||||
{
|
||||
/*
|
||||
auto status = execute ("task",
|
||||
{"_get", "rc.uda.reviewed.type"},
|
||||
input,
|
||||
output);
|
||||
*/
|
||||
std::string combined;
|
||||
join (combined, " ", args);
|
||||
|
||||
// Support '!ls' as well as '! ls'.
|
||||
if (combined[0] == '!')
|
||||
combined = combined.substr (1);
|
||||
|
||||
system (combined.c_str ());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue