mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Treat lines starting with '#' as comments in PSFTP.
[originally from svn r8325]
This commit is contained in:
parent
dc896b79af
commit
a6cbfd974d
@ -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
|
prompt. You can now type commands to perform file-transfer
|
||||||
functions. This section lists all the available commands.
|
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
|
\S{psftp-quoting} \I{quoting, in PSFTP}General quoting rules for PSFTP commands
|
||||||
|
|
||||||
Most PSFTP commands are considered by the PSFTP command interpreter
|
Most PSFTP commands are considered by the PSFTP command interpreter
|
||||||
|
5
psftp.c
5
psftp.c
@ -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 = sresize(cmd->words, cmd->wordssize, char *);
|
||||||
cmd->words[0] = dupstr("!");
|
cmd->words[0] = dupstr("!");
|
||||||
cmd->words[1] = dupstr(p+1);
|
cmd->words[1] = dupstr(p+1);
|
||||||
|
} else if (*p == '#') {
|
||||||
|
/*
|
||||||
|
* Special case: comment. Entire line is ignored.
|
||||||
|
*/
|
||||||
|
cmd->nwords = cmd->wordssize = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user