Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp Try to improve markup for better PostScript output.
details: https://anonhg.NetBSD.org/src/rev/aadbd045e296
branches: trunk
changeset: 1011916:aadbd045e296
user: uwe <uwe%NetBSD.org@localhost>
date: Wed Jul 15 19:23:44 2020 +0000
description:
Try to improve markup for better PostScript output.
diffstat:
usr.bin/ftp/ftp.1 | 252 ++++++++++++++++++++++++++++++------------------------
1 files changed, 140 insertions(+), 112 deletions(-)
diffs (truncated from 655 to 300 lines):
diff -r 66fc469e0964 -r aadbd045e296 usr.bin/ftp/ftp.1
--- a/usr.bin/ftp/ftp.1 Wed Jul 15 17:55:34 2020 +0000
+++ b/usr.bin/ftp/ftp.1 Wed Jul 15 19:23:44 2020 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ftp.1,v 1.140 2020/07/15 17:36:38 uwe Exp $
+.\" $NetBSD: ftp.1,v 1.141 2020/07/15 19:23:44 uwe Exp $
.\"
.\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -475,18 +475,16 @@
completion.
This is automatically enabled if input is from a terminal, and
disabled otherwise.
-.It Ic epsv epsv4 epsv6
+.It Ic epsv , epsv4 , epsv6
Toggle the use of the extended
.Dv EPSV
and
.Dv EPRT
commands on all IP, IPv4, and IPv6 connections respectively.
First try
-.Dv EPSV /
-.Dv EPRT ,
+.Dv EPSV Ns \^/\^ Ns Dv EPRT ,
and then
-.Dv PASV /
-.Dv PORT .
+.Dv PASV Ns \^/\^ Ns Dv PORT .
This is enabled by default.
If an extended command fails then this option will be temporarily
disabled for the duration of the current connection, or until
@@ -589,7 +587,7 @@
different from expansion of the name of an ordinary file:
the exact result depends on the foreign operating system and ftp server,
and can be previewed by doing
-.Ql mls remote-files \-
+.Sq Li mls remote-files \- .
Note:
.Ic mget ,
.Ic mput
@@ -670,32 +668,32 @@
command (see above).
.Pp
The macro processor interprets
-.Sq $
+.Ql $
and
-.Sq \e
+.Ql \e
as special characters.
A
-.Sq $
+.Ql $
followed by a number (or numbers) is replaced by the
corresponding argument on the macro invocation command line.
A
-.Sq $
+.Ql $
followed by an
-.Sq i
+.Ql i
signals the macro processor that the executing macro is to be
looped.
On the first pass
-.Dq $i
+.Ql $i
is replaced by the first argument on the macro invocation command
line, on the second pass it is replaced by the second argument,
and so on.
A
-.Sq \e
+.Ql \e
followed by any character is replaced by that character.
Use the
-.Sq \e
+.Ql \e
to prevent special treatment of the
-.Sq $ .
+.Ql $ .
.It Ic mdelete Op Ar remote-files
Delete the
.Ar remote-files
@@ -730,7 +728,7 @@
which can be changed with
.Ql lcd directory ;
new local directories can be created with
-.Ql "\&! mkdir directory" .
+.Sq Li "\&! mkdir directory" .
.It Ic mkdir Ar directory-name
Make a directory on the remote machine.
.It Ic mls Ar remote-files local-file
@@ -753,7 +751,7 @@
in a machine-parsable form, using
.Dv MLSD .
The format of display can be changed with
-.Sq "remopts mlst ..." .
+.Sq Li "remopts mlst ..." .
.It Ic mlst Op Ar remote-path
Display the details about
.Ar remote-path
@@ -761,7 +759,7 @@
in a machine-parsable form, using
.Dv MLST .
The format of display can be changed with
-.Sq "remopts mlst ..." .
+.Sq Li "remopts mlst ..." .
.It Ic mode Ar mode-name
Set the file transfer
.Ic mode
@@ -807,7 +805,7 @@
exist on the current system, the remote file is considered
.Ic newer .
Otherwise, this command is identical to
-.Ar get .
+.Ic get .
.It Ic nlist Op Ar remote-path Op Ar local-file
A synonym for
.Ic ls .
@@ -832,7 +830,8 @@
.Ar inpattern
and
.Ar outpattern .
-.Op Ar Inpattern
+.Pp
+.Ar inpattern
is a template for incoming filenames (which may have already been
processed according to the
.Ic ntrans
@@ -841,16 +840,16 @@
settings).
Variable templating is accomplished by including the
sequences
-.Dq $1 ,
-.Dq $2 ,
-\&...
-.Dq $9
+.Ql $1 ,
+.Ql $2 ,
+\&...\|,
+.Ql $9
in
.Ar inpattern .
Use
-.Sq \e
+.Ql \e
to prevent this special treatment of the
-.Sq $
+.Ql $
character.
All other characters are treated literally, and are used to determine the
.Ic nmap
@@ -858,53 +857,72 @@
variable values.
For example, given
.Ar inpattern
-$1.$2 and the remote file name "mydata.data", $1 would have the value
-"mydata", and $2 would have the value "data".
+.Sq Li $1.$2
+and the remote file name
+.Sq Li mydata.data ,
+.Ql $1
+would have the value
+.Sq Li mydata ,
+and
+.Ql $2
+would have the value
+.Sq Li data .
+.Pp
The
.Ar outpattern
determines the resulting mapped filename.
The sequences
-.Dq $1 ,
-.Dq $2 ,
-\&...
-.Dq $9
+.Ql $1 ,
+.Ql $2 ,
+\&...\|,
+.Ql $9
are replaced by any value resulting from the
.Ar inpattern
template.
The sequence
-.Dq $0
+.Ql $0
is replaced by the original filename.
Additionally, the sequence
.Dq Op Ar seq1 , Ar seq2
is replaced by
-.Op Ar seq1
+.Ar seq1
if
.Ar seq1
is not a null string; otherwise it is replaced by
.Ar seq2 .
For example, the command
.Pp
-.Bd -literal -offset indent -compact
-nmap $1.$2.$3 [$1,$2].[$2,file]
-.Ed
+.Dl nmap $1.$2.$3 [$1,$2].[$2,file]
.Pp
would yield
-the output filename "myfile.data" for input filenames "myfile.data" and
-"myfile.data.old", "myfile.file" for the input filename "myfile", and
-"myfile.myfile" for the input filename ".myfile".
+the output filename
+.Sq Li myfile.data
+for input filenames
+.Sq Li myfile.data
+and
+.Sq Li myfile.data.old ,
+.Sq Li myfile.file
+for the input filename
+.Sq Li myfile ,
+and
+.Sq Li myfile.myfile
+for the input filename
+.Sq Li "\&.myfile" .
Spaces may be included in
.Ar outpattern ,
as in the example:
+.Pp
.Dl nmap $1 sed "s/ *$//" > $1
+.Pp
Use the
-.Sq \e
+.Ql \e
character to prevent special treatment
of the
-.Sq $ ,
-.Sq \&[ ,
-.Sq \&] ,
+.Ql $ ,
+.Ql \&[ ,
+.Ql \&] ,
and
-.Sq \&,
+.Ql \&,
characters.
.It Ic ntrans Op Ar inchars Op Ar outchars
Set or unset the filename character translation mechanism.
@@ -1025,7 +1043,7 @@
as
.Sq Fl
or a command that starts with
-.Sq \&| .
+.Ql \&| .
Refer to
.Sx FILE NAMING CONVENTIONS
for more information.
@@ -1088,11 +1106,13 @@
command should be an
.Ic open ,
to establish the secondary control connection.
-Enter the command "proxy ?" to see other
+Enter the command
+.Sq Li "proxy ?"
+to see other
.Tn FTP
commands executable on the secondary connection.
The following commands behave differently when prefaced by
-.Ic proxy :
+.Ic proxy\^ :
.Ic open
will not define new macros during the auto-login process,
.Ic close
@@ -1137,7 +1157,7 @@
.It Ic quit
A synonym for
.Ic bye .
-.It Ic quote Ar arg1 arg2 ...
+.It Ic quote Op Ar arg ...
The arguments specified are sent, verbatim, to the remote
.Tn FTP
server.
@@ -1151,7 +1171,7 @@
.Pp
.Ar direction
may be one of:
-.Bl -tag -width "all" -offset indent -compact
+.Bl -tag -width ".Cm all" -offset indent -compact
.It Cm all
Both directions.
.It Cm get
@@ -1164,7 +1184,7 @@
can be modified on the fly by
.Ar increment
bytes (default: 1024) each time a given signal is received:
-.Bl -tag -width "SIGUSR1" -offset indent
+.Bl -tag -width ".Dv SIGUSR1" -offset indent
.It Dv SIGUSR1
Increment
.Ar maximum
@@ -1222,7 +1242,7 @@
Remote
.Tn FTP
commands known to support options include:
-.Sq MLST
Home |
Main Index |
Thread Index |
Old Index