EXECLINE-CD(1)

πŸ“¦ version 2.9.9.2, in nixpkgs unstable

πŸ’… EXECLINE-CD πŸ’…

Ok so bestie, grab a snack, because this one is a tiny page from the General Commands Manual and honestly it's giving "small but mighty" energy ✨. It's called execline-cd and it does exactly two things, and it does them flawlessly, no cap πŸ‘‘


🌸 NAME 🌸

execline-cd β€” changes the current working directory to a directory you pick, and then executes a program 🫢


πŸŽ€ SYNOPSIS πŸŽ€

execline-cd dir prog...

πŸ’– DESCRIPTION πŸ’–

Okay so here's the whole vibe, fr fr. execline-cd performs a chdir(2) system call on dir, and then exec(3)s into prog... πŸ¦‹

That's it. That's the whole main character arc. Walk into the new folder, then become the program. Iconic behaviour honestly.

By default, execline-cd can also be invoked as cd: there's a cd program, and it's a symbolic link to execline-cd. Very demure, very mindful πŸ‘‘.

⚠️ but wait, there's a plot twist β€” when execline has been configured with the --enable-pedantic-posix option, the cd binary is a symbolic link to the posix-cd(1) binary instead. So a cd command in an execline script will invoke posix-cd(1) instead of execline-cd. Different link, different bestie πŸ’€

And the reassuring part, because I know you were about to panic 😭: existing scripts that call cd will keep working no matter the chosen configuration. Slay. Your scripts are safe, periodt πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

All the friendgroup links, in order, so you have the whole squad:

emptyenv(1), envfile(1), exec(1), execline-umask(1), exit(1), export(1), fdblock(1), fdclose(1), fdmove(1), fdreserve(1), fdswap(1), getcwd(1), getpid(1), heredoc(1), piperw(1), posix-cd(1), posix-umask(1), redirfd(1), trap(1), tryexec(1), unexport(1), wait(1), withstdinas(1), chdir(2), exec(3)

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


✨ AUTHORS ✨

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

kay that's the whole page, you ate that, go chdir(2) into your best life and then exec(3) into something fabulous πŸ’…πŸ’–

mwah πŸ’‹ β€” this little port is from Debian, dated February 14, 2021, and that's the EXECLINE-CD(1) page, signed, sealed, delivered 🫢

πŸ“¦ where this page comes from