Skip to content

Instantly share code, notes, and snippets.

@ob1-sc
Created August 1, 2024 07:47
Show Gist options
  • Save ob1-sc/285980d978062dad2fa3b34825078fc0 to your computer and use it in GitHub Desktop.
Save ob1-sc/285980d978062dad2fa3b34825078fc0 to your computer and use it in GitHub Desktop.
Make zsh respect ~/.profile

The easiest solution to both work with zsh and run ~/.profile is to create a ~/.zprofile that enters sh emulation mode while it runs ~/.profile:

emulate sh
. ~/.profile
emulate zsh

If you have a recent enough zsh (on Ubuntu, that means since lucid, I think), you can simplify this to emulate sh -c '. ~/.profile'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment