4 ms·
Yes in a way; we work with both bash and zsh, and have a similar repos for config files. We are experiencing many developers switching from bash to zsh because
by jph 7y ago
Yes in a way; we work with both bash and zsh, and have a similar repos for config files.
We are experiencing many developers switching from bash to zsh because of the recent macOS Catalina OS upgrade, and we want to show how bash and zsh can be configured similarly.
We want to easily clone a group of shell helpers (aliases, functions, etc.) that can use our preferred conventions and abstractions, and can run on a wide range of systems.
- opk 7y agoFor zsh, you'd be better off handling functions via the function autoloading mechanism rather than defining them all from .zshenv. It is common to create a directory named ~/.zfunc (or similar), add that to $fpath and autoload the contents. This is rather more efficient than predefining them all as you would in bash. That said, looking at your functions, a function which just runs rsync with a bunch of options and "$@" should either be done via an alias (which preserves zsh rsync completion) or as an rsync alias in ~/.popt.
- jph 7y agoExcellent, thank you for the constructive advice! I'll start in on it.
- bloopernova 7y agoThat's good advice, thank you.
- curiousbiped 7y agoI'd do that as a zsh plugin. If you do one that's oh-my-zsh compatible, it'll work with most of the frameworks, and you can install it by hand if you're running bare ZSH. Then they just need to occasionally `git pull` to get updates to your company script collection. I wrote a brief set of guidelines at https://github.com/unixorn/awesome-zsh-plugins/blob/master/Writing_Plugins.md https://github.com/unixorn/awesome-zsh-plugins/blob/master/W... If you have them use a ZSH framework, (I recommend https://github.com/tarjoilija/zgen https://github.com/tarjoilija/zgen for load speed), the good ones can handle the periodic pulls for you automagically.