1

I use fish shell mainly from Rider IDE and iTerm2.

I've noticed that every task that implies saving something for future sessions will not operate transparently between the two aforementioned contexts. More precisely if I define a universal exported variable, or an alias, they'll be preserved from the "context" where they were defined and are absent from the other one.

For example, this is the output of alias invoked from Rider IDE (Terminal View):

❯ alias
alias br1 'brightness 1'
alias cat bat
alias cdg 'cd $(git rev-parse --show-cdup)./'
alias l ls
alias ll 'ls -l'
alias ls lsd
alias lt 'lsd -l --tree'

And this is the output of alias invoked from iTerm2:

❯ alias
alias br1 'brightness 1'
alias cat bat
alias ll 'ls -l'
alias ls lsd

The same behaviour with environment variables.

1
  • Please edit your question and tell us what operating system you are using. Is this on macOS? Also tell us how you define your aliases. If you're just setting them in the session, why would you expect them to be seen in other sessions? Aren't you editing a file somewhere? What file?
    – terdon
    Commented Jul 4, 2022 at 9:09

1 Answer 1

5

The Jetbrains IDEs run fish with a specific environment in order to add their own integrations. They do this by setting $XDG_CONFIG_HOME, which is where fish finds its universal variables.

This is broken in a variety of ways. See https://youtrack.jetbrains.com/issue/IDEA-169111

You might want to disable the shell integration in Preference -> Tools -> Terminal

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .