Standalone: Replace ~ with $HOME