Bug 330539 - Konsole opens bash after kdevelop_attach even if zsh is set.
Summary: Konsole opens bash after kdevelop_attach even if zsh is set.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-01-29 13:09 UTC by alexander.hermans0
Modified: 2016-11-30 19:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0


Attachments
zsh support patch for kdevplatform (10.32 KB, patch)
2016-10-26 12:07 UTC, Markus Trippelsdorf
Details
zsh support patch for kdevelop (755 bytes, patch)
2016-10-26 12:08 UTC, Markus Trippelsdorf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.hermans0 2014-01-29 13:09:41 UTC
I use zsh as my default shell, this was also nicely detected by Kdevelop, however when I open Konsole within KDelevop, it will run kdevelop_attach  -s {session identifier}. Afterwards I am located in a bash shell and opbviously all my settings from my zshrc are no longer in effect. 

I would like to see the option to actually select the shell, or simply disable the kdevelop_attach command so that I can still use the integrated Konsole in KDevelop. 

Reproducible: Always

Steps to Reproduce:
1. Use zsh as default shell. 
2. (Possibly also set /bin/zsh as default command in the config you get when right clicking the Konsole.)
3. Open Konsole in KDevelop.

Actual Results:  
I end up in a bash shell. 

Expected Results:  
I should still be in zsh.
Comment 1 Todd Nowacki 2014-02-07 23:49:36 UTC
It loads zsh for me. How did you change your default shell?
Comment 2 alexander.hermans0 2014-02-16 18:53:28 UTC
I changed the /etc/passwd/ entry for my user to /bin/zsh.
Comment 3 Diadlo 2016-10-13 23:18:40 UTC
KDevelop use it own addition for bash environment (`.bashrc`). I'm not sure, that it will work right in another shell
You can find it in the `kdevplatform_shell_environment.sh` file, in directory, where stored kdevelop! `whereis kdevelop\!`
Comment 4 Markus Trippelsdorf 2016-10-26 07:42:23 UTC
There was some attempt to add zsh support some years ago:
https://git.reviewboard.kde.org/r/110298/diff/3/
Comment 5 Kevin Funk 2016-10-26 10:42:07 UTC
Feel free to pick up those patches and rebase & test them once more, then we'll have these merged.

Any takers?
Comment 6 Markus Trippelsdorf 2016-10-26 12:07:10 UTC
Created attachment 101796 [details]
zsh support patch for kdevplatform
Comment 7 Markus Trippelsdorf 2016-10-26 12:08:34 UTC
Created attachment 101797 [details]
zsh support patch for kdevelop

The patches are attached. Works fine for me.
It is a bit ugly that .zshrc gets installed in /usr/bin.
Maybe it should live somewhere else?
Comment 8 Kevin Funk 2016-10-26 14:08:59 UTC
It'd be better to have these patches on either ReviewBoard or Phabricator so we could discuss the diff.
Comment 9 Markus Trippelsdorf 2016-10-26 15:48:30 UTC
(In reply to Kevin Funk from comment #8)
> It'd be better to have these patches on either ReviewBoard or Phabricator so
> we could discuss the diff.

It is just a rough rebase. I have only tested it in a very limited way.
Split open doesn't work for example:

markus@x4 ~ % cat test.zsh
RESULT=$(qdbus org.kdevelop.kdevelop-30695 /org/kdevelop/DocumentController org.kdevelop.DocumentController.openDocumentsSimple  $1 )
 if [[ "$RESULT" != "true" ]]; then
       echo "Failed to open $1" && exit 1
 fi
 echo "OK"
markus@x4 ~ % bash test.zsh "( /home/markus/bench.cpp - /home/markus/hello.cpp )"
OK
markus@x4 ~ % zsh test.zsh "( /home/markus/bench.cpp - /home/markus/hello.cpp )"
Failed to open ( /home/markus/bench.cpp - /home/markus/hello.cpp )

Not sure what is going on. 
So this needs more testing before it can be officially proposed.
Comment 10 Kevin Funk 2016-11-30 19:36:19 UTC
Patches pushed.

https://phabricator.kde.org/D3171 (kdevplatform)
https://phabricator.kde.org/D3172 (kdevelop)
Comment 11 Kevin Funk 2016-11-30 19:36:39 UTC
Thanks for the patches!