mkhomedir
mksourcedir

chezmoi edit $HOME${/}.file
grep -count=1 '# edited' $CHEZMOISOURCEDIR/dot_file
! grep '# edited' $HOME/.file

chezmoi edit --apply --force $HOME${/}.file
grep -count=2 '# edited' $CHEZMOISOURCEDIR/dot_file
grep -count=2 '# edited' $HOME/.file

chezmoi edit $HOME${/}.symlink
grep -count=1 '# edited' $CHEZMOISOURCEDIR/symlink_dot_symlink

chezmoi edit -v $HOME${/}script
grep -count=1 '# edited' $CHEZMOISOURCEDIR/run_script

chezmoi edit $HOME${/}.file $HOME${/}.symlink
grep -count=3 '# edited' $CHEZMOISOURCEDIR/dot_file
grep -count=2 '# edited' $CHEZMOISOURCEDIR/symlink_dot_symlink

chezmoi edit
exists $CHEZMOISOURCEDIR/.edited

[windows] stop 'remaining tests use file modes'

chezmoi edit $HOME${/}.dir
exists $CHEZMOISOURCEDIR/dot_dir/.edited

-- home/user/.local/share/chezmoi/run_script --
#!/bin/sh
