fresh
fresh copied to clipboard
Support for fish
Changed the function _fresh_preamble
as discussed in #125 . Same logic as before, but in fish syntax.
Currently the function works exclusively for either bash/zsh or fish, depending on the users default shell. If the user changes his/her default shell, the function would need to be re-run. Is this a problem? I am not sure at what times the function is called exactly.
Ideally, a single preamble would be emitted which runs on both bash/zsh and fish. From a few minutes of research, I don’t see a way to do this though.
How would you like to proceed? There is no way for a unified preamble as far as I can tell.
I would prefer to just have a way to disable the preamble completely. Perhaps expand FRESH_NO_PATH_EXPORT
also suppress the FRESH_PATH
export?
Ok, I will try that. _fresh_preamble gets called twice during fresh_install. Once because of _run_dsl install and once called directly. Is this intentional?
This is intentional. The call in _dsl_install_fresh
is to ensure the preamble is outputted before the first sourced shell content. The second call in fresh_install
is to ensure the preamble is outputted with an empty freshrc
file.