Cleanup + some chezmoi houskeeping cmds

This commit is contained in:
Gal Szkolnik 2022-06-06 10:28:09 -04:00
parent 179f23b633
commit 786370ba94
3 changed files with 10 additions and 6 deletions

View file

@ -3,6 +3,15 @@ if [[ -n "$(type -fP chezmoi)" ]]; then
alias cz-refresh="chezmoi status | cut -d\ -f2 | grep '^\.sz\.shrc\.d' | xargs chezmoi forget --force; chezmoi add ~/.sz.shrc.d --recursive; chezmoi status; chezmoi git status"
alias cz-commit="chezmoi git -- commit -a "
function cz-remove-missing() {
pushd ~ > /dev/null
changes=$(chezmoi status | sed -n 's/^DA[ \t]\+//p')
for c in $changes; do
chezmoi rm $c
done
popd > /dev/null
}
function cz-add-changes() {
pushd ~ > /dev/null
changes=$(chezmoi status | sed -n 's/^MM[ \t]\+//p')