This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Fish custom key binding with y
function doesn't update fish prompt directory
#1963
Closed
3 tasks done
What system are you running Yazi on?
macOS
What terminal are you running Yazi in?
kitty 0.34.1
yazi --debug
outputDescribe the bug
In fish shell, I configured a custom key binding (
ctrl+y
) to run the shell wrapper function, but when I pressctrl+y
in fish and then switch directories inside yazi and then pressq
, the fish prompt is still showing the original directory unless I enter another command, and only then does it show the correct directory that yazicd
'd into. The is probably a fish prompt issue, but figured I would bring this up since someone else might be trying the same thing.Minimal reproducer
Paste the following into
~/.config/fish/config.fish
:Follow these steps using fish shell:
pwd
(original directory, before pressingctrl+y
):Press
![image](https://private-user-images.githubusercontent.com/24758353/390608070-8a9c9aa1-d4da-4665-a724-f6eeb9ed1b5b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MjAxNTMsIm5iZiI6MTczOTgxOTg1MywicGF0aCI6Ii8yNDc1ODM1My8zOTA2MDgwNzAtOGE5YzlhYTEtZDRkYS00NjY1LWE3MjQtZjZlZWI5ZWQxYjViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDE5MTczM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ2NWViOWNlZjYyNzM4NGE4NzQ3MGEyZTVhMzdiZmY2Mjg1NTg0MmU5YWZhYTEwMzE4OWJiZDg0MGMzNzI3OTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uch9zIRR-cUpp1103IUiudgVsMy5lpKR4vLRBk96ZHY)
ctrl+y
:Move into another directory:
![image](https://private-user-images.githubusercontent.com/24758353/390608223-07ba515a-b19f-4f41-9cb0-dd9850392105.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MjAxNTMsIm5iZiI6MTczOTgxOTg1MywicGF0aCI6Ii8yNDc1ODM1My8zOTA2MDgyMjMtMDdiYTUxNWEtYjE5Zi00ZjQxLTljYjAtZGQ5ODUwMzkyMTA1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDE5MTczM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ0MWM5ZWJmNDgxZjhiNDJjMGM4MDQ5NmI4NzFlMzRhYWExYjY1Njk3MGM5YTc3ZjkzYjQ2M2Q3NzEwYzMxN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pIUwMyUwgRcgw-mS-_tKjIFMLR9_tLrjiZritpgqzfQ)
Press
![image](https://private-user-images.githubusercontent.com/24758353/390608533-8d3a45de-d659-4f1b-80a6-fb7f8f0536c7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MjAxNTMsIm5iZiI6MTczOTgxOTg1MywicGF0aCI6Ii8yNDc1ODM1My8zOTA2MDg1MzMtOGQzYTQ1ZGUtZDY1OS00ZjFiLTgwYTYtZmI3ZjhmMDUzNmM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDE5MTczM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMxNTZmMDdmMjFmOGVmMjhiMDYxMmI5Yjk4MmJlMzg3MmU1ZTBlMzhlNmQzMjMyZTQ3OGQwOWY3ZDY0YmRkY2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JK4jDftgsZQlC8gFet2031YOwREXdryivGeg4eio7S8)
q
(the correct directory is not being displayed in the fish prompt):pwd
again (the fish prompt only shows the correct directory after entering another command):Anything else?
This behavior doesn't occur when I run
y
in fish (without the custom key binding), and it works as expected.Validations
yazi --debug
) input box to the nightly that I triedmv ~/.config/yazi ~/.config/yazi-backup
)The text was updated successfully, but these errors were encountered: