Skip to contentSkip to conversation

wordexp.3: Make it clear that WRDE_NOCMD prevents command substitution.

PATCH Applied Carlos O'Donell 2 participants 2 messages Nov 19, 2014 – Dec 26, 2014 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wordexp.3: Make it clear that WRDE_NOCMD prevents command substitution.

The use of WRDE_NOCMD prevents command substitution. If the flag WRDE_NOCMD is set then no command substitution shall occur and the error WRDE_CMDSUB will be returned if such substitution is requested when processing the words.

The manual page as-is makes it seem like the command substitution occurs, and an error is returned *after* the substitution.

This patch clarifies that.

Patch against trunk.

man3/wordexp.3 +1 -1
index c695c08..e457943 100644
@@ -169,7 +169,7 @@ flag
 told us to consider this an error.
 .TP
 .B WRDE_CMDSUB
-Command substitution occurred, and the
+Command substitution requested, but the
 .B WRDE_NOCMD
 flag told us to consider this an error.
 .TP

---

Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive

Hi Carlos,

Quoted 19 lines · Carlos O'Donell

The use of WRDE_NOCMD prevents command substitution. If the flag WRDE_NOCMD is set then no command substitution shall occur and the error WRDE_CMDSUB will be returned if such substitution is requested when processing the words.

The manual page as-is makes it seem like the command substitution occurs, and an error is returned *after* the substitution.

This patch clarifies that.

Patch against trunk.

man3/wordexp.3 +0 -0
index c695c08..e457943 100644

man3/wordexp.3 flag · line 175

Quoted 8 lines
man3/wordexp.3 +1 -1
@@ -169,7 +169,7 @@ flag
 told us to consider this an error.
 .TP
 .B WRDE_CMDSUB
-Command substitution occurred, and the
+Command substitution requested, but the
 .B WRDE_NOCMD
 flag told us to consider this an error.
 .TP

Thanks!

Applied.

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html