Inspired by a recent commit of bentley@, I decided to clean up the
quoting characters in the csh man-page a bit:

Force ASCII versions of `, ', and ~ when appropriate, that is, escape
them as \(ga, \(aq, and \(ti in code snippets, commands, etc.  For the
sake of consistency use \(dq instead of \&" as well.

There were a few hand-rolled inline literal displays `...': use .Ql
instead.

While there, remove some single quotes that were escaped as \' since
this was done inconsistently and looks strange in the UTF8-locale.


Let me draw your attention to one change about which I'm a bit unsure:
In the hunk "@@ -919,14 +919,17 @@"
I suggest to replace
.Pq ` `
with
.Pq Ql \(ga
since this seems to be more consistent with the rest of the sentence.



Index: csh.1
===================================================================
RCS file: /cvs/src/bin/csh/csh.1,v
retrieving revision 1.75
diff -u -p -r1.75 csh.1
--- csh.1       28 Feb 2015 21:51:57 -0000      1.75
+++ csh.1       31 Mar 2015 08:32:56 -0000
@@ -231,17 +231,17 @@ A newline preceded by a
 is equivalent to a blank.
 .Pp
 Strings enclosed in matched pairs of quotations,
-.Ql ' ,
-.Ql ` ,
+.Ql \(aq ,
+.Ql \(ga ,
 or
-.Ql \&" ,
+.Ql \(dq ,
 form parts of a word; metacharacters in these strings, including blanks
 and tabs, do not form separate words.
 These quotations have semantics to be described later.
 Within pairs of
-.Ql '
+.Ql \(aq
 or
-.Ql \&"
+.Ql \(dq
 characters, a newline preceded by a
 .Ql \e
 gives
@@ -255,10 +255,10 @@ input line.
 This special meaning is prevented when preceded by
 .Ql \e
 and in quotations using
-.Ql ` ,
-.Ql ' ,
+.Ql \(ga ,
+.Ql \(aq ,
 and
-.Ql \&" .
+.Ql \(dq .
 .Ss Commands
 A simple command is a sequence of words, the first of which
 specifies the command to be executed.
@@ -503,14 +503,14 @@ while the input line remains unchanged.
 The same system of escape and end-of-file can also be used to
 expand partial user names, if the word to be completed
 (or listed) begins with the tilde character
-.Pq Ql ~ .
+.Pq Ql \(ti .
 For example, typing
 .Pp
-.Dl cd ~ro<escape>
+.Dl cd \(tiro<escape>
 .Pp
 may produce the expansion
 .Pp
-.Dl cd ~root
+.Dl cd \(tiroot
 .Pp
 The use of the terminal bell to signal errors or multiple matches
 can be inhibited by setting the variable
@@ -798,36 +798,36 @@ and
 .Ql }
 if necessary to insulate it from the characters that follow.
 Thus, after
-.Ic ls -ld ~paul
+.Ic ls -ld \(tipaul
 we might do
 .Ic !{l}a
 to do
-.Ic ls -ld ~paula ,
+.Ic ls -ld \(tipaula ,
 while
 .Ic !la
 would look for a command starting with
 .Dq la .
-.Ss Quotations with \' and \&"
+.Ss Quotations with \(aq and \(dq
 The quotation of strings by
-.Ql '
+.Ql \(aq
 and
-.Ql \&"
+.Ql \(dq
 can be used
 to prevent all or some of the remaining substitutions.
 Strings enclosed in
-.Ql '
+.Ql \(aq
 are prevented from any further interpretation.
 Strings enclosed in
-.Ql \&"
+.Ql \(dq
 may be expanded as described below.
 .Pp
 In both cases the resulting text becomes (all or part of) a single word;
 only in one special case (see
 .Em Command Substitution
 below) does a
-.Ql \&"
+.Ql \(dq
 quoted string yield parts of more than one word;
-.Ql '
+.Ql \(aq
 quoted strings never do.
 .Ss Alias substitution
 The shell maintains a list of aliases that can be established, displayed
@@ -873,7 +873,7 @@ Other loops are detected and cause an er
 .Pp
 Note that the mechanism allows aliases to introduce parser metasyntax.
 Thus, we can
-.Ic alias print 'pr \e!* \&| lpr'
+.Ic alias print \(aqpr \e!* \&| lpr\(aq
 to make a command that
 .Ic pr Ns 's
 its arguments to the line printer.
@@ -919,14 +919,17 @@ This expansion can be prevented by prece
 .Ql $
 with a
 .Ql \e
-except
-within double quotes (`"'), where it
+except within double quotes
+.Pq Ql \(dq ,
+where it
 .Em always
-occurs, and within single quotes (`''), where it
+occurs, and within single quotes
+.Pq Ql \(aq ,
+where it
 .Em never
 occurs.
 Strings quoted by backticks
-.Pq ` `
+.Pq Ql \(ga
 are interpreted later (see
 .Sx Command substitution
 below), so
@@ -944,13 +947,13 @@ more than one word, the first of which b
 and the rest of which become arguments.
 .Pp
 Unless enclosed in
-.Ql \&"
+.Ql \(dq
 or given the
 .Ql :q
 modifier, the results of variable
 substitution may eventually be command and filename substituted.
 Within
-.Ql \&" ,
+.Ql \(dq ,
 a variable whose value consists of multiple words expands to
 (a portion of) a single word, with the words of the variable's value
 separated by blanks.
@@ -1089,11 +1092,13 @@ after input-output redirection is perfor
 of the main shell.
 .Ss Command substitution
 Command substitution is shown by a command enclosed in
-.Ql ` .
+.Ql \(ga .
 The output from such a command is normally broken into separate words
 at blanks, tabs, and newlines, with null words being discarded;
 this text then replaces the original string.
-Within double quotes (`"'), only newlines force new words;
+Within double quotes
+.Pq Ql \(dq ,
+only newlines force new words;
 blanks and tabs are preserved.
 .Pp
 In any case, the single final newline does not force a new word.
@@ -1107,7 +1112,7 @@ If a word contains any of the characters
 or
 .Ql { ,
 or begins with the character
-.Ql ~ ,
+.Ql \(ti ,
 then that word is a candidate for
 filename substitution, also known as
 .Dq globbing .
@@ -1123,7 +1128,7 @@ and
 .Ql \&[
 imply pattern matching,
 the characters
-.Ql ~
+.Ql \(ti
 and
 .Ql {
 being more akin to abbreviations.
@@ -1176,11 +1181,11 @@ and so on.
 A character class may not be used as an endpoint of a range.
 .Pp
 The character
-.Ql ~
+.Ql \(ti
 at the beginning of a filename refers to home
 directories.
 Standing alone, i.e.,
-.Ql ~ ,
+.Ql \(ti ,
 it expands to the invoker's home directory as reflected
 in the value of the variable
 .Ar home .
@@ -1189,15 +1194,15 @@ When followed by a name consisting of le
 characters,
 the shell searches for a user with that name and substitutes their
 home directory; thus
-.Dq ~ken
+.Dq \(tiken
 might expand to
 .Dq /usr/ken
 and
-.Dq ~ken/chmach
+.Dq \(tiken/chmach
 to
 .Dq /usr/ken/chmach .
 If the character
-.Ql ~
+.Ql \(ti
 is followed by a character other than a letter or
 .Ql / ,
 or does not appear at the beginning of a word,
@@ -1211,7 +1216,7 @@ Left to right order is preserved, with r
 separately at a low level to preserve this order.
 This construct may be nested.
 Thus,
-.Dq ~source/s1/{oldls,ls}.c
+.Dq \(tisource/s1/{oldls,ls}.c
 expands to
 .Dq /usr/source/s1/oldls.c /usr/source/s1/ls.c
 without chance of error
@@ -1253,10 +1258,10 @@ and each input line is compared to
 before any substitutions are done on the input line.
 Unless a quoting
 .Ql \e ,
-.Ql \&" ,
-.Ql '
+.Ql \(dq ,
+.Ql \(aq
 or
-.Ql `
+.Ql \(ga
 appears in
 .Ar word ,
 variable and command substitution is performed on the intervening lines,
@@ -1266,7 +1271,7 @@ to quote
 .Ql $ ,
 .Ql \e
 and
-.Ql ` .
+.Ql \(ga .
 Commands that are substituted have all blanks, tabs, and newlines
 preserved, except for the final newline which is dropped.
 The resultant text is placed in an anonymous temporary file that
@@ -1364,16 +1369,16 @@ and
 commands.
 The following operators are available:
 .Bd -ragged -offset indent
-||  &&  |  ^  &  ==  !=  =~  !~  <=  >=
-<  > <<  >>  +  \-  *  /  %  !  ~  (  )
+||  &&  |  ^  &  ==  !=  =\(ti  !\(ti  <=  >=
+<  > <<  >>  +  \-  *  /  %  !  \(ti  (  )
 .Ed
 .Pp
 Here the precedence increases to the right,
 .Ql ==
 .Ql !=
-.Ql =~
+.Ql =\(ti
 and
-.Ql !~ ,
+.Ql !\(ti ,
 .Ql <=
 .Ql >=
 .Ql <
@@ -1393,15 +1398,15 @@ being, in groups, at the same level.
 The
 .Ql ==
 .Ql !=
-.Ql =~
+.Ql =\(ti
 and
-.Ql !~
+.Ql !\(ti
 operators compare their arguments as strings;
 all others operate on numbers.
 The operators
-.Ql =~
+.Ql =\(ti
 and
-.Ql !~
+.Ql !\(ti
 are like
 .Ql !=
 and
@@ -1693,7 +1698,7 @@ Execution continues after the specified 
 .It Ic hashstat
 Print a statistics line showing how effective the internal hash
 table has been at locating commands (and avoiding
-.Ic exec Ns \'s ) .
+.Ic exec Ns 's ) .
 An
 .Ic exec
 is attempted for each component of the
@@ -1950,7 +1955,7 @@ ignored.
 All processes detached with
 .Ql &
 are effectively
-.Ic nohup Ns \'ed .
+.Ic nohup Ns 'ed .
 .Pp
 .It Ic notify
 .It Ic notify % Ns Ar job ...
@@ -1994,7 +1999,7 @@ Pops the directory stack, returning to t
 With an argument
 .Dq + Ns Ar n
 discards the
-.Ar n Ns \'th
+.Ar n Ns 'th
 entry in the stack.
 The members of the directory stack are numbered from the top starting at 0.
 .Pp
@@ -2017,7 +2022,7 @@ onto the directory stack.
 With a numeric argument,
 .Ic pushd
 rotates the
-.Ar n Ns \'th
+.Ar n Ns 'th
 argument of the directory
 stack around to be the top element and changes to it.
 The members
@@ -2431,7 +2436,7 @@ The last executed command is always save
 .It Ic home
 The home directory of the invoker, initialized from the environment.
 The filename expansion of
-.Dq Pa ~
+.Dq Pa \(ti
 refers to this variable.
 .It Ic ignoreeof
 If set the shell ignores
@@ -2535,11 +2540,11 @@ for the superuser.
 .It Ic savehist
 Is given a numeric value to control the number of entries of the
 history list that are saved in
-.Pa ~/.history
+.Pa \(ti/.history
 when the user logs out.
 Any command that has been referenced in this many events will be saved.
 During start up the shell sources
-.Pa ~/.history
+.Pa \(ti/.history
 into the history list
 enabling history to be saved across logins.
 Too large values of
@@ -2674,13 +2679,13 @@ To detect looping, the shell restricts t
 substitutions on a single line to 20.
 .Sh FILES
 .Bl -tag -width /etc/passwd -compact
-.It Pa ~/.cshrc
+.It Pa \(ti/.cshrc
 read at beginning of execution by each shell
-.It Pa ~/.login
+.It Pa \(ti/.login
 read by login shell, after
 .Pa .cshrc
 at login
-.It Pa ~/.logout
+.It Pa \(ti/.logout
 read by login shell, at logout
 .It Pa /bin/sh
 standard shell, for shell scripts not starting with a
@@ -2690,7 +2695,7 @@ temporary file for
 .Ql <<
 .It Pa /etc/passwd
 source of home directories for
-.Dq ~name
+.Dq \(tiname
 .El
 .Sh SEE ALSO
 .Xr sh 1 ,

Reply via email to