this post was submitted on 29 Aug 2025
2 points (75.0% liked)

shell

152 readers
1 users here now

Welcome to share all things shell scripting (i.e. bash, zsh) here!

founded 2 years ago
MODERATORS
 

Someone in this thread suggests zsh can expand 1-char arguments to their long form. But my web search finds nothing on this. Can anyone confirm or deny whether that is true? Source appreciated if true.

Ultimately if zsh has that capability, then I would like to know how it would do that considering nroff (or whatever) does not define a uniform universal syntax to associate a long parameter to its short alias. This is a snip of manpage code from rsync and wget:

.IP "\fB\-\-relative\fP, \fB\-R\fP"
Use relative paths.…
.IP "\fB\-H\fR" 4
.IX Item "-H"
.PD 0
.IP "\fB\-\-span\-hosts\fR" 4
.IX Item "--span-hosts"
.PD
Enable spanning across hosts when doing recursive retrieving.

If zsh really has that capability, it would either have to be a quite sophisticated, or sloppy w/occasional flawed results, IIUC. Or is there a DB that maps long to short args somewhere?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here