Skip to content
This repository has been archived by the owner on Aug 26, 2019. It is now read-only.

Silent error every time the widget is open #3

Open
nilehmann opened this issue Oct 3, 2017 · 3 comments
Open

Silent error every time the widget is open #3

nilehmann opened this issue Oct 3, 2017 · 3 comments

Comments

@nilehmann
Copy link

nilehmann commented Oct 3, 2017

Whenever I open widget I get the following error

xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
NameError: name 'Keys' is not defined
error running xonsh run control file '/home/nlehmann/.xonshrc':  name 'Keys' is not defined

Then the error disappears and fzf works normally. In my xonshrc I have the following:

$fzf_history_binding = Keys.ControlR
$fzf_ssh_binding = Keys.ControlS

peek

@shahinism
Copy link
Owner

Would you please try adding following line at the top of your xonshrc file?

from prompt_toolkit.keys import Keys

@nilehmann
Copy link
Author

Ok, that fixed the problem. Thank you for your prompt reply :)

Anyways, why was the error being raised for the widget but not when loading my xonshrc?

@shahinism
Copy link
Owner

I'm not exactly sure about it yet. Probably something is changed on the order of loading Xontribs. I'm already importing Keys inside the xontrib itself, but when the xonshrc needs it, it is not there. I'll check it as soon as I can.

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

No branches or pull requests

2 participants