ref: 448ee4f664f60d70d229af5462ef349240af8d7f mrsh/builtin/cd.c -rw-r--r-- 3.4 KiB
Reset optind to 0

POSIX states that setting this to 0 is unspecified however setting it
to 1 is causing issues on certain versions of glibc.
builtin: minor adjustements

* Fix usage strings
* Remove trailing whitespace
* Remove implicit long to int conversion
* Check errno when calling strtol
23791269 — delthas 2 years ago
builtin: fail on invalid options and accept "--"
builtin: fix various issues found by static analysis
builtin/cd: fix segfault when PWD is not set
builtin/cd: fix a bunch of use-after-free
Introduce mrsh_variable
Implement `cd` builtin

POSIX `-L` and `-P` options are not yet implemented at this point.