0

I am using WebStorm 2017.1.3 on Fedora 25.

I have fish set up as my default shell and installed oh-my-fish so in Terminal I see my git branch and other information by default. omf update runs as expected.

In the WebStorm terminal emulator I still get fish, but not omf:

user@host ~> omf
fish: omf: command not found...

I'm a noob fish and omf user, can anyone help?

Thanks.

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
vekerdyb
  • 1,213
  • 12
  • 26
  • 2
    related issues: https://youtrack.jetbrains.com/issue/IDEA-169111, https://youtrack.jetbrains.com/issue/IDEA-173259 – lena Jun 20 '17 at 12:40

3 Answers3

5

I have fish set up as my default shell and installed oh-my-fish so in Terminal I see my git branch and other information by default.

Note that you don't need omf for this. Fish ships a number of prompts that include vcs information. You can pick one with fish_config or add the __fish_vcs_prompt function to your fish_prompt.

In the WebStorm terminal emulator I still get fish, but not omf:

user@host ~> omf

fish: omf: command not found...

The "omf" function is stored in a file named "omf.fish" in a directory in $fish_function_path. This means that directory isn't included there.

The way omf works in a reasonably current (> 2.3.0) fish is that it has a bootstrap file (~/.config/fish/conf.d/omf.fish) that then sources the rest. It seems this isn't run.

I'd suggest you compare the values of $fish_function_path, $OMF_PATH and possibly $XDG_DATA_HOME in webstorm and outside of it.

Community
  • 1
  • 1
faho
  • 14,470
  • 2
  • 37
  • 47
  • Thanks for the detailed answer, will get back to you once back in the office. – vekerdyb Jun 21 '17 at 09:44
  • As you suggested $fish_function_path was set to a different value (apparently WebStorm looks for `~/.config/fish/config.fish` and loads that only, and I did not have that file. I created it with the content of . ~/.config/fish/conf.d/omf.fish and now I have the same settings as outside of Webstorm – vekerdyb Jun 23 '17 at 08:17
2

An answer was given here: IntelliJ's embedded terminal does not load fish functions. I.e, add some lines of code to the app for the time being (until Jetbrains makes a fix).

leeuwd
  • 66
  • 6
2

I fixed this by going to Settings | Terminal then turning off Shell integration.

This allowed me to run omf and also have the bobthefish theme work with powerline/nerd fonts (after updating the terminal font at Settings | Editor | Color Scheme | Font Console)

I was using phpStorm 2017.3.4 but I assume this will also work in any IntelliJ embedded terminal.

ook
  • 655
  • 6
  • 6