Cmd
Cmd
Cmd represents a name or path of a command in the shell.
Bool
method Bool( ā¶ Bool)
Cmd returns .exists
in Bool context
if Cmd<curl> || Cmd<wget> -> $ua {
say "$ua is here, it can be our http user agent";
}
exists
method exists( ā¶ Bool)
Returns true if the command can be found in the current shell enironment.
my Bool $have-node = Cmd<node>.exists