cd(n)

πŸ“¦
version 9.0.3 Β· 3 versions
, in alpine 3.23, alpine 3.24, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ cd(n) β€” the Tcl Built-In Commands glow-up ✨

okay bestie, welcome to cd(n), straight outta the Tcl Built-In Commands manual section πŸ’… this is the one that moves you around the filesystem, and honestly? it's giving navigator. main character energy fr fr.


🌸 NAME 🌸

cd β€” change working directory. that's it. that's the whole job. iconic.


πŸŽ€ SYNOPSIS πŸŽ€

cd ?dirName?

πŸ’– DESCRIPTION πŸ’–

So like, cd changes the current working directory to dirName. and if you don't hand it a dirName at all? it just bops you over to the home directory, which it figures out from the HOME environment variable. and then it returns an empty string, because it's humble like that. no receipts, no drama. 🫢

⚠️ ok now the important part, no cap: the current working directory is a per-process resource. so when you cd, you're changing the working directory for all interpreters and all threads. every single one. it's a group chat situation β€” one person moves, everybody moves. πŸ’€

🌈 EXAMPLES 🌈

Wanna go home to the user fred's home directory? bet. 🏠

cd [file home fred]

Wanna slide into the lib directory that's a sibling of wherever you currently are? sibling behavior, we love to see it. πŸ¦‹

cd ../lib

πŸ‘‘ SEE ALSO πŸ‘‘

(yes pwd(n) is right there, the little "where am i" bestie to this "take me there" bestie, a duo πŸ₯Ή)


⭐ KEYWORDS ⭐

working directory


and that's the page!! source + version check: this is from Tcl, dated to the cd(n) manual page, and it's filed under Tcl at the bottom like a little signature. mwah. go forth and navigate, you absolute legend πŸ’…βœ¨

πŸ“¦ where this page comes from