yash-rs icon indicating copy to clipboard operation
yash-rs copied to clipboard

Implementing built-ins (POSIX portability)

Open magicant opened this issue 4 years ago • 1 comments

This issue tracks minimum POSIX-compliant implementation of built-in utilities. Non-portable features are tracked in #265.

In the list below, built-ins are grouped by their dependent environments. However, most built-ins additionally depend on the standard output and error file descriptors and variables.

Nop

  • :
    • [x] #322
  • true
    • [x] 3d3fe8ee4efbb032a40b8e876fc7d23f72d69c51
  • false
    • [x] 854b7ff3295c663d0bbecd40bd393f29a72256ab

Execution control

  • .
    • [x] #324
  • break
    • [x] #188
  • continue
    • [x] #189
  • eval
    • [x] #323
  • exec
    • [x] #231
  • exit
    • [x] #266
    • [x] #268
  • ~~newgrp~~
  • return
    • [x] #271

Working directory

  • cd
    • [x] #284
  • pwd
    • [x] #278

File creation mask

  • umask
    • [x] #354

Limits

  • ulimit
    • [x] #355

Spent times

  • times
    • [x] #351

Signals

  • kill
    • [x] #346
  • trap
    • [x] #337

Jobs

  • bg
    • [x] #339
  • fg
    • [x] #339
  • jobs
    • [x] #155
  • wait
    • [x] #152

Variables and functions

  • export
    • [x] #319
  • getopts
    • [x] #326
  • read
    • [x] #327
  • readonly
    • [x] #320
  • shift
    • [x] #305
  • unset
    • [x] #301

Aliases

  • alias
    • [x] #328
  • unalias
    • [x] #329

Command path cache

  • hash
    • [ ] Hash built-in
      • Show cached utilities
      • Update utility path cache
      • Clear utility path cache

Command history

  • fc
    • [ ] Fc built-in
      • Semantics
        • Show command history
        • Edit and execute a command from history
      • Portable options
        • -e ...
        • -l
        • -n
        • -r
        • -s

Miscellaneous

  • command, type (Mostly related with execution control, but also dependent on file system, aliases, functions, and command path cache)
    • [x] #347
      • [ ] Extend support for confstr on more systems
    • [x] #350
  • set (Related with shell options and variables)
    • [x] #149

magicant avatar Feb 09 '21 15:02 magicant