SUMMARY When opening a tex file the inbuilt konsole send a cd and clear command which appear in bash_history. STEPS TO REPRODUCE 1. Open tex file in kile. 2. Close it. 3. Open bash_history OBSERVED RESULT Two new entries in bash_history. EXPECTED RESULT No new entry. SOFTWARE/OS VERSIONS Linux/KDE Plasma: latest archlinux (available in About System) KDE Plasma Version: latest KDE Frameworks Version: latest Qt Version: latest ADDITIONAL INFORMATION It can be solve by adding in src/widgets/konsolewidget.cpp lines 134 and 135 a space at the beginning of the line, as does dolphin to prevent writing to bash_history if the option "ignorespace" is set in bashrc. These lines would then be m_term->sendInput(" cd " + KShell::quoteArg(directory) + '\n'); m_term->sendInput(" clear\n");
Git commit cef2d4888250581420a7909bad5644a9c3c8dedb by Nicolas Fella, on behalf of Alessio Bonfiglio. Committed on 27/06/2022 at 23:36. Pushed by nicolasfella into branch 'master'. Add white space before console commands in order to avoid save them into bash history This avoids saving the `cd` and `clear` commands into the bash history if `ignorespace` is set in bashrc Dolphin and Kate do the same in their Konsole integrations Related: bug 391537 M +2 -2 src/widgets/konsolewidget.cpp https://invent.kde.org/office/kile/commit/cef2d4888250581420a7909bad5644a9c3c8dedb