2020.2 install blew away my git bash terminal configuration.

已回答

As the title outlines... I hope this isn't the start of losing even more settings from my prior Intillij Ultimate installation.

2

Could you please clarify the issue with the screenshot? Which specific setting was lost? What's the current state of this option after it was reset?

0

sure... 2019.4 - 

the terminal as configured (using git bash)

settings:

2020.2 :

terminal

settings: (no bash settings pulled over)

0

so, easily fixed, but just concerned that I might find other missing settings... this was the most obvious.

0

It can be caused by https://youtrack.jetbrains.com/issue/IDEA-244170 if you were using a pre-release build of 2020.2.

The final build is not affected and the setting should now persist.

Previously it was not possible to set terminal path per project at all: https://youtrack.jetbrains.com/issue/IDEA-179501 . Implementing this feature has caused IDEA-244170.

-1

Per project? isn't this setting persisted across all projects? I've never had to set it on a per-project basis... I set it once and all project I open attach this setting to it.

0

It was the behavior before 2020.2, now there is an option to set it per project.

There is also the default setting as usual that can be set for all the new projects:

1

Sorry... not quite getting this entirely. So if I define this terminal type in the "New Project Settings" then (obviously) any new project will have this bash shell configuration.

I take it that there's no way to "retrofit" this setting for projects that had already been created prior to 2020.2, eh? All of them will have the standard terminal shell and I'll have to manually update the terminal settings of the project.  

0

well, I guess another way is to  whack the .idea project folder and have it regenerate.

 

0
Avatar
Permanently deleted user
Here's the process I followed to apply my previous terminal shell path setting forward to 2020.2.
 
The Terminal settings have changed from being a global setting to being a per-project setting.
 
First, I found the previous global terminal shell path setting from the config of the previous IntelliJ version:
grep myShellPath ~/.IntelliJIdea2019.3/config/options/terminal.xml
 
Second, I applied it to the default settings for new project via File | New Project Settings | Settings for New Projects... | Tools | Terminal | Shell path.
 
Third, I changed the Terminal settings for each project that already exists.
 
Here's a bash one-liner to update all of your projects in one go. Run it in the directory one level higher than all of your projects. Plug in your previous terminal shell path (discovered via above grep command) where specified.  Close IntelliJ before running this.
 
(Disclaimer: Run at your own risk.  Take time to understand what it does.  Backup your files first, yadda, yadda)
 
find . -maxdepth 3 -name workspace.xml  | grep .idea | xargs grep --files-without-match TerminalProjectNonSharedOptionsProvider | xargs -i{} sed --in-place= 's#</project>#  <component name="TerminalProjectNonSharedOptionsProvider">\n    <option name="shellPath" value="your-shell-command-encoded-as-an-xml-attribute-value" />\n  </component>\n</project>#g' {}
1

Tnx for the info.

I set the new default settings and just used the following code to remove all .idea folders.

find . -name .idea -exec rm -rf {} \;

IntelliJ now creates them again for every project I open with the new default settings.

Like the comment above: (Disclaimer: Run at your own risk. Take time to understand what it does. Backup your files first, etc)

0

Good idea (ha!), but I think I'll just delete/regen as I go. Knowing my scripting skills I'll wind up deleting my entire system :)

0
Avatar
Permanently deleted user

The Issue is marked answered, but it shouldn't be... as above was caused after implementation of https://youtrack.jetbrains.com/issue/IDEA-179501

What was expected:

  • Option to set Global/Default Terminal Settings/preferences other than Native OS Defaults (eg: Windows CMD)
  • Option to override Global Terminal Setting in Project Level Settings, if particular project required to deviate from the Defaults.

What was implemented instead:

  • Blow away Global/Default Terminal Settings/preferences and let IntelliJ pick Native OS default temrinal.
  • Give option to set Terminal Settings/preferences only at Project Level, so that each project can have it's own terminal settings.

 

Which made it worse for users/developers, as now for each existing projects user first have to open settings and set the desired terminal setting, even though User needs same Terminal Settings for all the projects.

Someone above suggested to do such painful recurresive action, but that isn't solution to real problem.

Moreover, Allowing project level Terminal Settings, doesn't warrants the removal of a Global Terminal settings.

0
Avatar
Permanently deleted user

Please Vote Up for https://youtrack.jetbrains.com/issue/IDEA-247221 if you want the issue to be resolved !!

0

IntelliJ IDEA 2020.2.1 (Ultimate Edition)
Build #IU-202.6948.69, built on August 24, 2020

Microsoft Windows [Version 10.0.18363.900]

Okay, so now I don't know which way to go with this...

I have a project where I would like a normal windows console terminal. Given how this was working, I thought I could go to File->Settings->Tools->Terminal , enter cmd.exe for the Shell path, and this setting would be associated to the current project?

This is incorrect as it effects all projects... so how can I change it just for the current project?

0

Changing it while the project is open will affect only the current project. Changing it in the default settings from the file menu or via the welcome screen will affect all new projects.

0

yeah, but how does "Changing it while the project is open" work?

I have the project I'd like changed open, I do the steps that I outlined above:

File->Settings->Tools->Terminal , enter cmd.exe for the Shell path

close and reopen another project that did have the bash shell configured for it, and it is now a cmd console terminal too.

am I missing a different settings option flow that is specific to the project?

0

Your defaults for all projects were reset to cmd.exe.

If you change it in one project, then change it in another project, does it persist per project?

0

Sorry, I'm not clear on what you're asking... but I think this is what I had attempted to outlined above...

  1. I open two projects, both are initially defined to have bash shell terminals.
  2. from the first project I do : File->Settings->Tools->Terminal , enter cmd.exe for the Shell path then OK
  3. I close and reopen both projects. Both have been reset to cmd consoles for their terminals.
0

请先登录再写评论。