diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-10-29 13:08:35 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-10-29 13:08:35 +0000 |
commit | a5324897c506281b11c9eef0231763b348e88e4d (patch) | |
tree | 4c821fc4a28ce194a8368a61ccf3c4d28a338aff | |
parent | 6678b4722aaa0311e8f4371d204fe8b5995b2896 (diff) | |
download | FreeBSD-src-a5324897c506281b11c9eef0231763b348e88e4d.zip FreeBSD-src-a5324897c506281b11c9eef0231763b348e88e4d.tar.gz |
Document command -v and -V.
Glanced at by: simon
-rw-r--r-- | bin/sh/sh.1 | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 563810c..b0679ae 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd September 9, 2005 +.Dd October 29, 2005 .Dt SH 1 .Os .Sh NAME @@ -1462,7 +1462,8 @@ A synonym for the .Ic cd built-in command. .It Ic command Oo Fl p Oc Op Ar utility Op Ar argument ... -Execute the specified +.It Ic command Oo Fl v | V Oc Op Ar utility +The first form of invocation executes the specified .Ar utility as a simple command (see the .Sx Simple Commands @@ -1474,6 +1475,42 @@ option is specified, the command search is performed using a default value of .Ev PATH that is guaranteed to find all of the standard utilities. +.Pp +If the +.Fl v +option is specified, +.Ar utility +is not executed but a description of its interpretation by the shell is +printed. +For ordinary commands the output is the path name; for shell built-in +commands, shell functions and keywords only the name is written. +Aliases are printed as +.Dq Ic alias Ar name Ns = Ns Ar value . +.Pp +The +.Fl V +option is identical to +.Fl v +except for the output. +It prints +.Dq Ar utility Ic is Ar description +where +.Ar description +is either +.Bl -item -offset indent +.It +the path name to +.Ar utility , +.It +.Ic a shell builtin , +.It +.Ic a shell function , +.It +.Ic a shell keyword +or +.It +.Ic an alias for Ar value . +.El .It Ic echo Oo Fl e | n Oc Op Ar string Print .Ar string |