Bug 435957 - Useless "cd <location> items are added to history when switching directories with the Dolphin GUI
Summary: Useless "cd <location> items are added to history when switching directories ...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: panels: terminal (show other bugs)
Version: 22.04.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-04-20 15:20 UTC by israel
Modified: 2022-11-04 21:12 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description israel 2021-04-20 15:20:46 UTC
SUMMARY
every directory change in the GUI fills the bash history.  Make your program use a different default history, and then only populate the user's bash history (to use in TTY/other terminals) when they input things into the terminal.

STEPS TO REPRODUCE
1. Have the terminal panel present
2. Change directories
3. Change Tabs

OBSERVED RESULT
all my bash history is corrupted with cd /whatever

EXPECTED RESULT
only real user generated commands should be stored this way.  if you need to store the (cd /whatever) do it in some other file.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.11.14-1-MANJARO
Comment 1 Nate Graham 2021-04-20 19:20:16 UTC
Seems reasonable.
Comment 2 Andrew Meyer 2022-11-04 21:12:39 UTC
A workaround: Some shells have a setting where commands with a leading space don't get added to the history. Dolphin already puts a space before each command it sends to the terminal, i.e. " cd <location>", so enabling this setting in bash should keep the history from getting clogged.

If you use bash, add to .bashrc: HISTCONTROL=ignorespace
If you use zsh, add to .zshrc: setopt HIST_IGNORE_SPACE