Hacker News new | ask | show | jobs
by ashconnor 651 days ago
I migrated to chezmoi recently my only gripe is `chezmoi cd` opening in a new shell but `chezmoi git` usually is what I need. The age [0] integration is nice.

[0] - https://github.com/FiloSottile/age

2 comments

I added an alias `cm='cd $(chezmoi source-path)'` to my shell config to cd to the chezmoi directory (without opening a new shell) so I can use all the usual commands (e.g. git) without need the chezmoi prefix. The alias is in a chezmoi-managed file, naturally.
Unfortunately there's no other way of doing this, except for adding a shell alias. See https://www.chezmoi.io/user-guide/frequently-asked-questions....
Makes sense. Thank you for the project.