Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

: . and [ not in man pages. #9552

Closed
IsaacOscar opened this issue Feb 7, 2023 · 3 comments
Closed

: . and [ not in man pages. #9552

IsaacOscar opened this issue Feb 7, 2023 · 3 comments

Comments

@IsaacOscar
Copy link

This is the most minor complaint, but going man :, man ., or man [ does not give you the fish man pages. I noticed these commands where returned by builtin --names and it took me a while to work out what they were. I had to use help :, help ., and help [ to get their documentation. (whereas I usually use man)

These commands are also not listed in https://fishshell.com/docs/current/commands.html

Also what is the point of : ? Apparently it is an alias for true.

@faho
Copy link
Member

faho commented Feb 7, 2023

Unfortunately man pages would require that we use the builtin name as a filename, and that causes issues on some systems.

Since this is a very minor issue (these are all compatibility gunk), we choose not to. The help pages are nicer to look at anyway.

@faho faho closed this as completed Feb 7, 2023
@faho faho added this to the will-not-implement milestone Feb 7, 2023
@IsaacOscar
Copy link
Author

IsaacOscar commented Feb 7, 2023

I don't know how Bash is doing it, but there is no : or . file, on my system.

Instead man : and man . somehow find the file /usr/share/man/man1/bash_builtins.1.gz
Which is this:

.\" This is a hack to force bash builtins into the whatis database
.\" and to get the list of builtins to come up with the man command.
.\"
.\" File Name macro.  This used to be `.PN', for Path Name,
.\" but Sun doesn't seem to like that very much.
.\"
.de FN
\fI\|\\$1\|\fP
..
.TH BASH_BUILTINS 1 "2021 November 22" "GNU Bash 5.2"
.SH NAME
:, ., [, alias, bg, bind, break, builtin, caller,
cd, command, compgen, complete, compopt,
continue, declare, dirs, disown, echo, enable, eval, exec, exit,
export, false, fc, fg, getopts, hash, help, history, jobs, kill,
let, local, logout, mapfile, popd, printf, pushd, pwd, read,
readarray, readonly, return, set,
shift, shopt, source, suspend, test, times, trap, true, type, typeset,
ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
.SH BASH BUILTIN COMMANDS
.nr zZ 1
.so /usr/share/man/man1/bash.1
.SH SEE ALSO
bash(1), sh(1)

There is however a /usr/share/man/man1/[.1.gz file whose contents is merely:

.so man1/test.1

@faho
Copy link
Member

faho commented Feb 7, 2023

On second thought, we can reroute these in our man function.

@faho faho reopened this Feb 7, 2023
@faho faho removed this from the will-not-implement milestone Feb 7, 2023
@faho faho closed this as completed in 8ff78ed Feb 7, 2023
@faho faho added this to the fish 3.6.1 milestone Feb 7, 2023
zanchey pushed a commit that referenced this issue Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants