Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: CHASE_LINKS and PS1



Seb wrote on Thu, 14 Nov 2019 16:48 +00:00:
> 
> > While I haven't got anything particularly clever, I presume you've 
> > thought of simply adding that to ~/.zshrc?
> 
> Aww... I hadn't realized that ~/.zshrc is indeed a list of commands.
> 'cd' is now added at the end of the file and all is well.

This will cd to the homedir even if you start zsh from elsewhere.  You
might want something like «if [[ -e ./.is_my_homedir ]]; then cd; fi».
(Create that file manually, once.)

If your zsh is new enough to support «print -v», you can also do:

    if print -v tmp -Pr %~; [[ $tmp == '/home/seb' ]]; then cd; fi
    unset tmp



Messages sorted by: Reverse Date, Date, Thread, Author