Recklessly Smashing mruby Into Zsh
willhbr.net·1d
Flag this post

If you’re a reasonably serious shell user you probably know that you’ve got to write some things as shell functions instead of scripts because they need to modify the state of the shell itself. Usually that’s altering environment variables or changing the working directory of the shell. Often it’s just that you want to save some state for later and don’t want to deal with saving it to a file and parsing it back later.

I’ve got an old shell function called gcd that changes directory to a predefined location where I keep my projects. It also has autocomplete based on the project names. I originally write it with support for cloning repos, so you’d just do gcd https://codeberg.org/willhbr/dotfiles.git and it w…

Similar Posts

Loading similar posts...