Skip to content

cdh causes the fish_prompt event to be sent twice #7039

Closed
@lrworth

Description

@lrworth
lukeworth@Lukes-MBP /tmp> function show_prompt_details --on-event fish_prompt
      echo fish_prompt received!
  end
fish_prompt received!
lukeworth@Lukes-MBP /tmp> cd a
fish_prompt received!
lukeworth@Lukes-MBP /t/a> prevd
fish_prompt received!
lukeworth@Lukes-MBP /tmp> cdh
 a  1)  /tmp/a
fish_prompt received!
fish_prompt received!
Select directory by letter or number:

This is particularly annoying because I was using the fish_prompt event to display a wrappable environment status (c.f. #904 (comment)).

As a workaround I am using the fish_postexec event. (Um, if anyone's using vim and this starts breaking plugins, try :set shell=sh to force POSIX shell instead of fish. TIL)

Environment

[I] ➜ echo $version
3.1.2
[I] ➜ uname -a
Darwin Lukes-MBP 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64 i386 MacBookPro11,5 Darwin
[I] ➜ echo $TERM
xterm-256color

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions