1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Add the `pwd' command in PSFTP.

[originally from svn r1262]
This commit is contained in:
Simon Tatham 2001-09-09 16:31:26 +00:00
parent 31eb324fd1
commit 89e59fc5a3

15
psftp.c
View File

@ -275,6 +275,15 @@ int sftp_cmd_cd(struct sftp_command *cmd)
return 0;
}
/*
* Print current directory. Easy as pie.
*/
int sftp_cmd_pwd(struct sftp_command *cmd)
{
printf("Remote directory is %s\n", pwd);
return 0;
}
/*
* Get a file and save it at the local end. We have two very
* similar commands here: `get' and `reget', which differ in that
@ -918,6 +927,12 @@ static struct sftp_cmd_lookup {
" argument <remote-filename>.\n",
sftp_cmd_put
},
{
"pwd", "print your remote working directory",
"\n"
" Print the current remote working directory for your SFTP session.\n",
sftp_cmd_pwd
},
{
"quit", "bye", NULL,
sftp_cmd_quit