Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move away from fish_greeting for initialization #4

Open
sagebind opened this issue Apr 24, 2017 · 0 comments
Open

Move away from fish_greeting for initialization #4

sagebind opened this issue Apr 24, 2017 · 0 comments
Assignees

Comments

@sagebind
Copy link

Using fish_greeting to define functions and run initialization code for themes should be considered unreliable and breaks in the following cases:

  • User switches themes during the middle of a terminal session. The shell is not reloaded, and so fish_greeting is not executed.
  • User has a custom fish_greeting variable or function, overriding the theme's default greeting. Again, the theme's fish_greeting is not executed.

The recommended approach is to lazy-load defaults using set -q ...; or set -g ... and to place functions in individual files in a functions directory.

See the discussion in oh-my-fish/oh-my-fish#483.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants