Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My story would echo this same sentiment. Incidentally, running `man command` on OS X actually does not reference a '-v' option at all, instead only stating the more verbose `command which`. Both appear to work, but it further highlights your (our) discoverability issue(s).


There is no man or info page for "command" on Ubuntu, I guess it's just a bash builtin ("which command" doesn't find it). "which" has a man page though.


In bash, such things are documented in the help system:

    $ help command
    command: command [-pVv] command [arg ...]
        Execute a simple command or display information about commands.
    
        Runs COMMAND with ARGS suppressing  shell function lookup, or display
        information about the specified COMMANDs.  Can be used to invoke commands
        on disk when a function with the same name exists.
    
        Options:
          -p    use a default value for PATH that is guaranteed to find all of
                the standard utilities
          -v    print a description of COMMAND similar to the `type' builtin
          -V    print a more verbose description of each COMMAND
    
        Exit Status:
        Returns exit status of COMMAND, or failure if COMMAND is not found.


I didn't know about the "help" command in bash. I've always gone to "man bash", and then scrolled up and down for an hour or so.

Or just cranked-up a search engine.

So thanks for that.


Apparently, there's an "info" command, as well


Though info isn't POSIX compliant.

Not to mention that most distributions completely ignore it and don't populate it with a program's info documentation -- even when such exists.


Neither is Bash.

And, being GNU projects, Bash and `info` generally come hand-in-hand.


Wow. I never knew this. I tried scouring through the bash manpage to get hold of its inbuilt commands. Thanks.


For bash, it is documented with 'help command' or the bash man page, section SHELL BUILTIN COMMANDS.


The main problem is there is no good way to provide manpages for shell builtins, like `command`.

Man can only have one entry (per section) for a given command, but what if you're using Bash? Or Zsh? How would it know which one to give you? If they're named differently (like a manpage for `bash-command` vs `zsh-command`), how would you know to look those up? (never mind that apropos would give you so-overloaded-to-be-useless results for something as generic as `command`)

Which leaves us in the current situation where `man command` redirects to a generic `builtin` manpage, that doesn't have much info, and certainly nothing specific to Bash or Zsh.


There could potentially be a bash-<builtin> man page. For example, bash-command or bash-mapfile.


`command which` just executes `which`




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: