POSIX-CD(1)

πŸ“¦ version 2.9.9.2, in nixpkgs unstable

okay bestie, this is posix-cd(1) from the General Commands Manual, and it’s giving β€œchange the current working directory, then execute a program” main character energy. buckle up πŸ’…

πŸŽ€ NAME πŸŽ€

posix-cd β€” changes the current working directory to a given directory, then executes a program. periodt.

✨ SYNOPSIS ✨

posix-cd [-L | -P] dir prog...

πŸ’– DESCRIPTION πŸ’–

so posix-cd changes the current working directory to dir according to the POSIX specification for a cd external utility[1]. then, if prog... is not empty, it execs into it. slay.

when execline has been configured with the --enable-pedantic-posix option, the cd command is a symbolic link to it. so scripts calling cd will use posix-cd. when this configuration option has not been given, cd is a symbolic link to execline-cd(1). iykyk.

posix-cd fully conforms to the POSIX specification[1]. when prog... is not empty, the behaviour of a cd utility is not specified by POSIX, so posix-cd extends the spec to be actually useful and usable in an execline program with the same interface as the regular execline cd command (cf. execline-cd(1)). iconic behaviour, honestly.

nobody ever executes or needs the external version (i.e. not a shell builtin) of the POSIX cd command. compared to execline’s regular cd binary, execline-cd(1), posix-cd is uselessly bloated and slow. not me saying that with love 😭 the only reason it exists is that some distributions refuse to package execline correctly unless it is strictly POSIX-compliant; the --enable-pedantic-posix configure option is there to satisfy their requirements. and that’s the tea 🍡


🌈 SEE ALSO 🌈

the whole bestie squad, fr fr:

[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/cd.html

this man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/posix-cd.html 🫢

πŸ‘‘ AUTHORS πŸ‘‘

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

mwah πŸ’‹ this Debian-flavoured page is dated February 14, 2021 β€” bye bestie, go change some directories responsibly ✨

πŸ“¦ where this page comes from