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

Treat lines starting with '#' as comments in PSFTP.

[originally from svn r8325]
This commit is contained in:
Jacob Nevins 2008-11-24 18:19:55 +00:00
parent dc896b79af
commit a6cbfd974d
2 changed files with 8 additions and 0 deletions

View File

@ -143,6 +143,9 @@ Once you have started your PSFTP session, you will see a \c{psftp>}
prompt. You can now type commands to perform file-transfer
functions. This section lists all the available commands.
Any line starting with a \cw{#} will be treated as a \i{comment}
and ignored.
\S{psftp-quoting} \I{quoting, in PSFTP}General quoting rules for PSFTP commands
Most PSFTP commands are considered by the PSFTP command interpreter

View File

@ -2240,6 +2240,11 @@ struct sftp_command *sftp_getcmd(FILE *fp, int mode, int modeflags)
cmd->words = sresize(cmd->words, cmd->wordssize, char *);
cmd->words[0] = dupstr("!");
cmd->words[1] = dupstr(p+1);
} else if (*p == '#') {
/*
* Special case: comment. Entire line is ignored.
*/
cmd->nwords = cmd->wordssize = 0;
} else {
/*