Add local shell access feature in sftp.exe client

This was not implemented before in Win32. !takes to the windows shell
and !command runs the command in Windows shell. exit brings the user
back to sftp like in Linux/Unix shell.
This commit is contained in:
quamrulmina 2015-10-19 17:55:55 -05:00
parent 98dc596200
commit 2cfb138bb8

12
sftp.c
View File

@ -292,14 +292,12 @@ help(void)
static void
local_do_shell(const char *args)
{
#ifdef WIN32_FIXME
#ifdef WIN32_FIXME
/*
* Not implemented on native Win32.
*/
fprintf(stderr, "Local shell is not implemented on Win32.\n");
if (!*args) {
args = (char *) getenv("ComSpec"); // get name of Windows cmd shell
}
system(args); // execute the shell or cmd given
#else
/*