Ticket #3001 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

garbage in subshell prompt

Reported by: onlyjob Owned by: andrew_b
Priority: minor Milestone: 4.8.9
Component: mc-core Version: 4.8.8
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Unlike previous mc versions in mc-4.8.8 my subshell prompt often looks like

;37m$

This is happens when I enter 4...5 directories from panel.

I hope this is easy to fix. Thanks.

Change History

comment:1 Changed 11 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to invalid

I hope this is fixed in 2991.

comment:2 follow-up: ↓ 3 Changed 11 years ago by onlyjob

  • Status changed from closed to reopened
  • Resolution invalid deleted

No it's not (I tested), #2991 is unrelated.
Why "invalid"? Although minor this is genuine problem when subshell prompt is (at least) not properly sanitised from ANSI colors.

Last edited 11 years ago by onlyjob (previous) (diff)

comment:3 in reply to: ↑ 2 Changed 11 years ago by andrew_b

I'm unable to reproduce this.
Could you try git bisect to find the bad commit?

comment:4 Changed 11 years ago by onlyjob

comment:5 Changed 11 years ago by slavazanko

Could you please specify steps to reproduce the bug? For example, which path should be opened for reproduce the bug? What keys you pressed before? And so on. I want an information for reproduce the bug in unit tests.

Thank you.

comment:6 Changed 11 years ago by onlyjob

It depends on length of path to current working directory. For example in /mnt/r6/video/0.2kill my subshell prompt look like [0;37m$

$PS1 is important: mine is [\D{%Y-%m-%d %R:%S}]\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:0\[\033[01;34m\]\w\[\033[00m\]\[\033[1;33m\]$(__git_ps1 "(%s)")\[\033[0;37m\]\$

This is on TERM="xterm-256color" in konsole terminal emulator.

comment:7 Changed 11 years ago by andrew_b

  • Milestone changed from Future Releases to 4.8.9

Please test the following:

branch:3001_garbage_in_prompt
changeset:e7f12b92fbcefd71c4d8bc98482add22b332c4f8

comment:8 Changed 11 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from reopened to accepted
  • Keywords subshell prompt removed
  • Branch state changed from no branch to on review

comment:9 Changed 11 years ago by onlyjob

Apparently this didn't make any effect on the problem. Sorry.

comment:10 Changed 11 years ago by andrew_b

  • Branch state changed from on review to on rework

comment:11 Changed 11 years ago by andrew_b

I've created another branch:
Branch:3001_subshell_prompt_fix
Initial changeset:f6684c638d19e22fb6710794148634daccadc888

Please test. I hope, this branch fixes the bug.

Last edited 11 years ago by andrew_b (previous) (diff)

comment:12 Changed 11 years ago by andrew_b

  • Branch state changed from on rework to on review

comment:13 Changed 11 years ago by onlyjob

It works perfectly. :)
Thank you. (I'll test a bit more just to make sure).

comment:14 Changed 11 years ago by onlyjob

  • Summary changed from strange-looking subshell prompt to garbage in subshell prompt

comment:15 Changed 11 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:16 Changed 11 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • Branch state changed from on review to approved

comment:17 Changed 11 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko angel_il to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [ffc536fb5dae402dcbe86c6b44a7f97cb4541505].

git log --pretty=oneline 61d230e..ffc536f

comment:18 Changed 11 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.