Strange behavior when navigating terminal history.

Discussion in 'macOS' started by Eminarp7, Nov 19, 2009.

  1. Eminarp7 macrumors newbie

    Aug 15, 2009
    When I look through my bash history (by pressing up), occasionally the first 3 or 4 characters of a command will stay and push everything else forward.
    For example, suppose my last few commands were:

    vi .bashrc
    ls | grep D

    And then I was trying to edit .bashrc again. After hitting up three times my prompt would say:

    $ ls |vi.bashrc

    The command would still work as intended but seeing this is very strange and often confusing at first. I searched around and couldn't really find anyone else reporting this issue and was at least wondering if anyone knew how this could happen. I have a modified prompt, if that could cause it. From my .bashrc file:

    export PS1="\e[36;40m\A \w\n$ \e[0m"

    So it looks something like:

    military-time pwd

    Any explanation (even if in lieu of a fix) would be appreciated. As I said, it's doesn't really impede functionality, it's just odd. Thanks in advance.
  2. Eminarp7 thread starter macrumors newbie

    Aug 15, 2009
    Also, I'm pretty sure (although not certain) that this behavior has been present since before I upgraded from Leopard to Snow Leopard on my MBP; in case that might be a factor.
  3. Eminarp7 thread starter macrumors newbie

    Aug 15, 2009

Share This Page