Skip to content

Subshell precmd emulation fills ash/dash/csh/tcsh history with internal pwd commands #2104

@mc-butler

Description

@mc-butler

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/2104
Reporter doktornotor (notordoktor@….com)
Mentions mc-trac@….de, kyogre1@….ru

E.g., if I type cd /usr/portage/distfiles into a subshell in , the folloging will get logged:

cd "printf "%b" '\0057'"
cd "printf "%b" '\0057usr'"
cd "printf "%b" '\0057usr\0057portage'"
cd "printf "%b" '\0057usr\0057portage\0057distfiles'"
cd "printf "%b" '\0057'"

The above is on Gentoo.

On FreeBSD, junk gets logged as well, e.g. cd /var/log produces:

#+1267704528
cd "printf "%b" '\0057var'"
#+1267704528
cd "printf "%b" '\0057var\0057log'"

Have had this problem for ages, valid with any app-misc/mc version incl. the latest masked 4.7.1. Happens semi-randomly and usually doesn't happen if I press Enter before typing into the subshell.

Reproduced on Gentoo and FreeBSD, have had this issue for ages. Currently using bash-4.1_p2 but as said above, it doesn't matter, been so for a long time.

Related downstream bug: http://bugs.gentoo.org/show_bug.cgi?id=309261

In case it matters:

$ echo $PS1
\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]

If you need something else, let me know :)

Note

Original attachments:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues not related to a specific subsystemprio: mediumHas the potential to affect progressver: 4.7.1Reproducible in version 4.7.1

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions