The Art of “Cd Create”: Eliminating Terminal Friction One Shortcut at a Time
If you spend any significant amount of time in a command-line interface (CLI), you are undoubtedly familiar with a routine ritual: you want to start a new project, so you type mkdir my-awesome-project, hit enter, and immediately follow it up with cd my-awesome-project.
It is a tiny, seemingly harmless sequence. Yet, to thousands of developers, system administrators, and power users, repeating that exact directory name twice back-to-back represents a subtle form of friction. Enter “cd create”—the popular terminal workflow hack designed to merge directory creation and navigation into a single, seamless motion.
The Micro-Frustration of Two Steps
At first glance, typing a directory name twice takes only a couple of seconds. But developer efficiency isn’t just about saving large blocks of time; it’s about reducing cognitive load and mechanical waste.
When you break down the traditional two-step process, a few minor annoyances emerge:
- The Danger of Typos: Typing a long directory name twice leaves a window open for human error. If you slightly misspell it on the second try, you accidentally spawn a stray, empty folder somewhere in your file system.
- Unnecessary Context Switching: Conceptually, your brain has only one intent: “Take me into a brand new workspace called X.” Forcing your fingers to execute two distinct commands for a single mental objective creates a micro-delay in your flow state.
Operating systems and default shells (like Bash or Zsh) do not natively ship with a built-in cd-create command out of the box. This is because cd is a shell builtin managed directly by the environment, while mkdir is an independent binary executable. Fortunately, bridging this gap takes less than a minute.
How to Implement Your Own “Cd Create” Shortcut
You can easily teach your terminal this new behavior by adding a small, elegant shell function to your configuration file (such as ~/.bashrc, ~/.bash_profile, or ~/.zshrc).
Leave a Reply