fresh icon indicating copy to clipboard operation
fresh copied to clipboard

Support for fish

Open bugabinga opened this issue 10 years ago • 5 comments

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.

bugabinga avatar Jan 01 '15 04:01 bugabinga

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.

jasoncodes avatar Jan 01 '15 10:01 jasoncodes

How would you like to proceed? There is no way for a unified preamble as far as I can tell.

bugabinga avatar Jan 10 '15 11:01 bugabinga

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?

jasoncodes avatar Jan 11 '15 05:01 jasoncodes

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?

bugabinga avatar Jan 12 '15 15:01 bugabinga

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.

jasoncodes avatar Jan 12 '15 22:01 jasoncodes