Bug 465325

Summary: Kate terminal receives cd (change directory) commands regardless program running in terminal
Product: [Applications] kate Reporter: Robert Dady <robert.dady>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 22.12.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 23.04
Sentry Crash Report:

Description Robert Dady 2023-02-05 17:43:48 UTC
SUMMARY
***
In Kate open a terminal and run e.g. python interpreter in that terminal. Should you open an other file in an other tab, assuming the file is in a different directory, python get cd (change directory) command, that it cannot interpret resulting in multiline python errors. Using someting different like octave, this is not an issue, as octave understands cd commands.
***


STEPS TO REPRODUCE
1.  Open Kate
2.  open some file
3.  open terminal
4. run python in terminal
5. open one more file in Kate that is in a different directory

OBSERVED RESULT
Python gets confused with cd commands.

EXPECTED RESULT
No cd command given to python - or any other program than bash (or any other different default shell)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 22.12.2
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-02-09 06:56:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1098
Comment 2 Christoph Cullmann 2023-02-09 08:39:55 UTC
Git commit fb26afa3f6567f375770e2f5d4d3f124254bde49 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 09/02/2023 at 08:39.
Pushed by cullmann into branch 'master'.

Konsole: Dont cd if a process is running in terminal
FIXED-IN: 23.04

M  +3    -0    addons/konsole/kateconsole.cpp

https://invent.kde.org/utilities/kate/commit/fb26afa3f6567f375770e2f5d4d3f124254bde49