Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by ladybanshee on Wednesday January 14, 2026 @03:21PM
(#46622541)
Could you explain the purpose of mkcd?
[ Parent
| on HN ]
Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by az09mugen on Wednesday January 14, 2026 @03:30PM
(#46622714)
Not the author, but my first guess is to create a folder and cd into it with just one command instead of 2 with the said argument, isn't it ?
Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by antomal on Wednesday January 14, 2026 @03:32PM
(#46622757)
Exactly. It's a small quality-of-life feature to avoid the repetitive mkdir && cd sequence. In GRSH, it also ensures the directory is created with the necessary permissions before the shell attempts to switch into it.
Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by az09mugen on Wednesday January 14, 2026 @03:36PM
(#46622840)
I love the concept, very good yet simple idea ! I'll steal it for my aliases.
Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by antomal on Wednesday January 14, 2026 @03:44PM
(#46623011)
Go ahead and 'steal' away! That’s the beauty of open source.
I actually built it into the shell precisely because I was tired of managing those aliases across different machines. Glad you found it useful!
Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by danabowler on Friday January 16, 2026 @07:28AM
(#46645768)
Is it not possible to realize it with alias?
Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by antomal on Friday January 16, 2026 @07:34AM
(#46645794)
Great question! While you could technically hack a similar behavior using a shell function (not a simple alias, as aliases don't handle positional arguments well), grsh implements mkcd as a native builtin.
By baking it into the shell in Rust, I can ensure atomic execution and better error handling without relying on the user's specific .bashrc or .zshrc hacks. It's about providing a 'batteries-included' experience where common workflows are first-class citizens of the shell itself.
Re:Show HN: Grsh – A high-performance shell for FreeBSD writ...
by antomal on Wednesday January 14, 2026 @03:27PM
(#46622647)
It’s a shortcut
Its purpose is to combine mkdir -p and cd into a single atomic-like action. Instead of typing: mkdir -p my_project && cd my_project
You simply run: mkcd my_project
It's designed to reduce friction during development, especially when you're frequently creating new nested directory structures.