Hinweis zu select (README, row.man); Backslash in rdb man korrigiert

This commit is contained in:
wkh
2026-10-11 22:35:37 +02:00
parent d2c4343136
commit 6c0d675c5d
4 changed files with 39 additions and 2 deletions
+6
View File
@@ -7,6 +7,12 @@ folgen [Semantic Versioning](https://semver.org/lang/de/). Die Version steht in
## [Unveröffentlicht]
### Geändert
- README und `man/row.man` erklären, warum `select` in bash/zsh/ksh einen Syntaxfehler gibt und wie man es trotzdem aufruft.
### Behoben
- `rdb man` zeigte `\\select` in den Man-Pages als `\elect`: ein doppelter Backslash wird jetzt zuerst geschützt.
## [0.5.0] - 2026-10-11
### Hinzugefügt
+4
View File
@@ -175,6 +175,10 @@ er nicht mehr passt (außer mit `-a`). Beide halten die Indizes aktuell.
`row`, `compute`, `column`, `sorttable`, `jointable`, `rename`, `validate` und
`rdb` haben dazu den Abschnitt „Case of Column Names“; er ist die einzige
Ergänzung gegenüber den Original-Seiten.
- `select` ist in bash, zsh und ksh ein reserviertes Wort. `select 'Cost > 5' < inventory` endet dort
mit `syntax error near unexpected token '<'`, weil die Shell das Schlüsselwort vor dem `PATH` auswertet.
Es gibt dasselbe unter dem Namen `row`. Außerdem gehen `\select ...`, `command select ...` und
`rdb select ...`.
- `jointable` braucht keine vorsortierten Tabellen.
- `ve` ist ein zeilenorientierter Editor, kein Bildschirmeditor.
- `soundex` nutzt den Standard-Algorithmus. Die Beispielwerte im Handbuch
+3 -2
View File
@@ -81,9 +81,10 @@ end
# ---- manual pages ---------------------------------------------------------------
def troff_clean(str)
str.gsub(/\\f[BIRP]/, '').gsub('\\e', '\\').gsub('\\(em', ' -- ').gsub('\\(aa', "'")
# a literal backslash (\\ or \e) is parked in \0 so that later rules cannot see it
str.gsub('\\\\', "\0").gsub(/\\f[BIRP]/, '').gsub('\\e', "\0").gsub('\\(em', ' -- ').gsub('\\(aa', "'")
.gsub('\\-', '-').gsub('\\&', '').gsub('\\*(UX', 'UNIX').gsub('``', '"').gsub("''", '"').gsub('\\ ', ' ')
.gsub(/\\\(..|\\\*\(..|\\[a-z]/, '').gsub('\\\\', '\\')
.gsub(/\\\(..|\\\*\(..|\\[a-z]/, '').gsub("\0", '\\')
end
def render_man(src)
+26
View File
@@ -191,6 +191,32 @@ Names that are also
reserved words or are followed by
.B (
are never taken for columns.
.SH "Using select in a Shell"
.I "(Ruby re-creation only.)"
.B select
is another name for
.BR row ,
but in
.BR bash ,
.B zsh
and
.B ksh
``select'' is a reserved word of the shell.
The shell recognizes it before it looks for a program, so
.DM
select 'Cost > 5' < inventory
.DE
.PP
stops with a syntax error at the ``<''.
Use the name
.B row
instead, or protect the word from the shell:
.DM
row 'Cost > 5' < inventory
\\select 'Cost > 5' < inventory
command select 'Cost > 5' < inventory
rdb select 'Cost > 5' < inventory
.DE
.SH "See Also"
.B
compute,