Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] $status not passed to prompt #75

Open
00-kat opened this issue Feb 9, 2024 · 3 comments
Open

[Bug] $status not passed to prompt #75

00-kat opened this issue Feb 9, 2024 · 3 comments

Comments

@00-kat
Copy link

00-kat commented Feb 9, 2024

What I did:

  • installed with fisher install acomagu/fish-async-prompt
  • ran set -U async_prompt_inherit_variables all, then restart fish (the bug existed even before this)
    No matter what the return code is, it will always give a return code of 1.
    I'm just using the default fish prompt.

To demonstrate, here's a simple function:

function statcode --description 'Change the status code'
    return $argv[1]
end

Testing:

[I] user@host ~ [1]> statcode 124
[I] user@host ~ [1]> echo $status
124
[I] user@host ~ [1]> statcode 2
[I] user@host ~ [1]> echo $status
2
[I] user@host ~ [1]> statcode 1
[I] user@host ~ [1]> echo $status
1

Notice how the status is always 1.

@mal1kc
Copy link

mal1kc commented Feb 11, 2024

i have experienced same issue,i think it's related to 23e416f have temporary solution by using specific commit a89bf42 like:

# _Don't forget to remove master version before install specific commit_

fisher remove acomagu/fish-async-prompt

fisher install acomagu/fish-async-prompt@a89bf4216b65170e4c3d403e7cbf24ce34b134e6

itsfarseen added a commit to itsfarseen/dotfiles that referenced this issue Mar 29, 2024
@m-torhan
Copy link

m-torhan commented Apr 9, 2024

It looks like $jobs isn't passed neither:

┌[maciej@alpha]-[~]
└$ sleep 3 &

┌[maciej@alpha]-[~]
└$ sleep 3 &

┌[maciej@alpha]-[~]
└$ 
fish: Job 1, 'sleep 3 &' has ended

┌[maciej@alpha]-[~]
└$ 
fish: Job 2, 'sleep 3 &' has ended

┌[maciej@alpha]-[~]
└$ 

Same behavior is observed while using acomagu/fish-async-prompt@a89bf4216b65170e4c3d403e7cbf24ce34b134e6. It also messes up transient prompt.

Expected behavior (mine transient prompt is $time-$character):

[22:16:59]-$ sleep 3 &
[22:16:59]-$ sleep 3 &

┌[maciej@pi]-[~]
└[✦2]-$ 
fish: Job 1, 'sleep 3 &' has ended

┌[maciej@pi]-[~]
└[✦]-$ 
fish: Job 2, 'sleep 3 &' has ended

┌[maciej@pi]-[~]
└$ 

@wangyandongnx
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants