In this diff, the function definition of sendCdToTerminal is changed to run just a clear command after the cd command.
This seems like a reasonable compromise to me. Clearing the output when the panel is closed and re-opened keeps it visually clean and I think it makes sense. @elvisangelaccio?
Also @khanaasif please provide your email address so if this patch is accepted by Dolphin's maintainer, we can land it with correct authorship information. Thanks!
Hmm, I don't I like it sorry. Running clear without the user permission could be annoying or even dangerous.
But this is not what this patch does. clear will be executed every time you change a folder in dolphin.
This patch looks more like a workaround to me. I'd suggest to identify the root cause of "^C" and "cd <path>" whenever the terminal is hidden and reopened again by hitting F4 and to find a another solution as I guess and especially hope that this behaviour is actually not necessary to happen.