tldr-pages/tldr

Revisiting all bash builtin commands

Open

#10,584 opened on Aug 3, 2023

View on GitHub
 (10 comments) (1 reaction) (0 assignees)Shell (2,507 forks)batch import
help wantednew command

Repository metrics

Stars
 (30,937 stars)
PR merge metrics
 (Avg merge 7d 5h) (321 merged PRs in 30d)

Description

As I suggested in https://github.com/tldr-pages/tldr/pull/10579 and https://github.com/tldr-pages/tldr/pull/10580, all bash builtin commands should be revisited. They can easily be listed with compgen -b, help or enable. To list all shell keywords compgen -k. It is recommended to use help command for information gathering, as builtins don't have a man page.

First of all their linked manual pages link to some Tcl programming language manuals like for example https://manned.org/while instead of anything useful like https://www.gnu.org/software/bash/manual/bash.html#index-while Secondly some of these commands might be fully POSIX compliant, but Windows doesn't care about POSIX. Thus they should be moved from common to linux. Ideally they'd be moved to *nix, but we don't have that category. Thirdly it needs to be considered which commands are exclusive to Bash, which commands apply to other *nix as well and which commands are POSIX compliant but with additions and edit the description to match that. Fourthly the headers should be unified to say "bash builtin" in the same way.

Tick a checkbox after you've verified the things listed above in a command.

Builtins

Shell syntax

Closing tokens

Control flow keywords

Resources: https://www.gnu.org/software/bash/manual/bash.html#Reserved-Words https://manned.org/man/while.1 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

Contributor guide