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
Thirdly it needs to be considered which commands are exclusive to Bash, common to linux. Ideally they'd be moved to *nix, but we don't have that category.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
- %
- {
- [
- [[
- .
- :
- alias
- bg
- bind
- break
- builtin
- caller
- cd
- command
- compgen
- complete
- compopt
- continue
- declare
- dirs
- disown
- echo
- enable
- eval
- exec posix exec
- exit
- export posix export
- false
- fc
- fg
- getopts
- hash
- help
- history
- jobs posix jobs
- kill posix kill
- let
- local
- logout
- mapfile
- popd
- printf
- pushd
- pwd
- read
- readarray
- readonly
- return
- set
- shift
- shopt
- source
- suspend
- test
- times
- trap posix trap
- true
- type
- typeset
- ulimit
- umask
- unalias
- unset
- wait
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