Comment by antomal

24 days ago

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.

I love the concept, very good yet simple idea ! I'll steal it for my aliases.

  • 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!

Is it not possible to realize it with alias?

  • 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.