sh(1): Document the special underscore parameter ("$_")
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 26346 Build 24816: arc lint + arc unit
Event Timeline
Documentation for the _ variable was indeed missing.
bin/sh/sh.1 | ||
---|---|---|
1329–1330 | The character sequence _ is a name (per "Variables and Parameters" above), so this should be moved under "Special Variables" below. The term "non-pipeline command" should be "simple command". This term is used elsewhere in the man page and is more precise. For example, a for loop which is a complex command that is not a pipeline still does not set $_ (except for any simple commands nested in it). Also, it should be mentioned that $_ is only updated by interactive shells executing outside functions (if an interactive shell is currently executing a function, $_ expands to the last word of the last simple command executed before the outermost function call). |
@pstef, at some point, I hope so. Nevertheless, if you are willing to commandeer this revision then please do it by all means!