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

Can Fish shell start without loading Config? #6691

Closed
koumaza opened this issue Mar 1, 2020 · 5 comments
Closed

Can Fish shell start without loading Config? #6691

koumaza opened this issue Mar 1, 2020 · 5 comments
Labels

Comments

@koumaza
Copy link

koumaza commented Mar 1, 2020

fish, version 3.1.0-276-gf89794844
3.1.0

Linux REQU-wsl 4.19.84-microsoft-standard #1 SMP Wed Nov 13 11:44:37 UTC 2019 x86_64 GNU/Linux
screen-256color

Fish uses /tmp as the Temporary Directory, which prevents access to anything running in /tmp from outside the container.
Eg fish_config
I have set config.fish to start genie on Archlinux in WSL2 environment, but this will prevent parent (Windows side) from accessing /tmp in the container.
Genie builds containers for systemd to work.
It may be bad to write in config.fish
I do not fully understand Fish, but I think it is necessary if there is no flag to specify Temporary and there is no way to start Fish without loading Config.
like bash --noprofile --norc

@faho
Copy link
Member

faho commented Mar 1, 2020

Fish uses /tmp as the Temporary Directory

Not quite - it uses $TMPDIR as the temporary directory, falling back to /tmp if that isn't set.

So just set it before starting fish, like e.g. TMPDIR=(mktemp -d) fish.

@faho faho added the question label Mar 1, 2020
@koumaza
Copy link
Author

koumaza commented Mar 1, 2020

Thanks.
TMPDIR worked fine. 😁
But fish_config uses Py Script, so it may not be relevant. sorry.

Is there currently no way to start fish without loading Config other than env HOME=/tmp fish ? 🤔
In WSL: wsl -e env HOME=/tmp fish -c 'foo'

@zanchey
Copy link
Member

zanchey commented Mar 1, 2020

See #1256; at present, no.

@faho
Copy link
Member

faho commented Mar 1, 2020

But fish_config uses Py Script, so it may not be relevant. sorry.

Considering that it uses python's tempfile and I'm pretty sure that also obeys $TMPDIR, it should be.

@koumaza
Copy link
Author

koumaza commented Mar 1, 2020

That's right. I didn't set TMPDIR before launching fish.
set -gx TMPDIR a;fish_config
env TMPDIR=~/a fish -c 'fish_config'

@koumaza koumaza closed this as completed Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants