<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>391537</bug_id>
          
          <creation_ts>2018-03-07 19:54:34 +0000</creation_ts>
          <short_desc>bash_history flooded by &quot;cd foo/foo&quot; and &quot;clear&quot; commands</short_desc>
          <delta_ts>2022-06-27 23:36:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kile</product>
          <component>general</component>
          <version>2.9.91</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Benjamin Hennion">benjamin.hennion</reporter>
          <assigned_to name="Michel Ludwig">michel.ludwig</assigned_to>
          <cc>benjamin.hennion</cc>
    
    <cc>paul.peringuey</cc>
          
          <cf_commitlink>https://invent.kde.org/office/kile/commit/cef2d4888250581420a7909bad5644a9c3c8dedb</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>20</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1736484</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Hennion">benjamin.hennion</who>
    <bug_when>2018-03-07 19:54:34 +0000</bug_when>
    <thetext>Kile writes

cd &lt;working dir&gt;
clear

in .bash_history every time the live preview is compiled after saving, if the live preview behaviour is set to &quot;compile after saving&quot;.

Note that if the live preview is set to compile whenever changes have been made, it only writes the above two lines at launch (and not at every compilation of the preview).

This certainly is related to https://bugs.kde.org/show_bug.cgi?id=265165, which has been closed for years.

Step to reproduce:
1- Set live preview to compile every time you save
2- Open a file, modify it and save it (so that the live preview is updated). 
3- Close Kile and look at .bash_history.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931561</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Péringuey">paul.peringuey</who>
    <bug_when>2020-05-21 11:13:18 +0000</bug_when>
    <thetext>I&apos;m guessing the problem still comes from the built in konsole as typing history -c in this one prevent the lines to be added to bash_history.

I&apos;d suggested to replace &quot;clear&quot; by &quot;clear &amp;&amp; history -d -1 &amp;&amp; history -d -1&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2135299</commentid>
    <comment_count>2</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2022-06-27 23:36:59 +0000</bug_when>
    <thetext>Git commit cef2d4888250581420a7909bad5644a9c3c8dedb by Nicolas Fella, on behalf of Alessio Bonfiglio.
Committed on 27/06/2022 at 23:36.
Pushed by nicolasfella into branch &apos;master&apos;.

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 453935

M  +2    -2    src/widgets/konsolewidget.cpp

https://invent.kde.org/office/kile/commit/cef2d4888250581420a7909bad5644a9c3c8dedb</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>