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

Bash - Enter causes last word to be deleted before insert #46

Closed
yebrahim opened this issue Apr 8, 2021 · 6 comments
Closed

Bash - Enter causes last word to be deleted before insert #46

yebrahim opened this issue Apr 8, 2021 · 6 comments
Labels
shell:bash Issues related to Bash type:bug Something isn't working

Comments

@yebrahim
Copy link

yebrahim commented Apr 8, 2021

Summary:
Hitting enter after using Fig to autocomplete a command causes last word to be deleted before insert on Bash.

Steps to Reproduce:

  1. Type cd /e and let Fig autocomplete etc using Tab, showing the first option as the little enter sign.
  2. Hit Enter to go to that path.

Expected Results:
Navigation to /etc.

Actual Results:
Navigation to /.

It seems the last word is deleted. So for example if you pick cd /tmp/dir-name/ and hit Enter, what's executed is cd /tmp/dir-.

System information:
OS: MacOS Big Sur 11.0.1
Terminal: (MacOS Terminal, iTerm2, etc)
Version of Fig: 1.0.39.

@yebrahim yebrahim added the type:bug Something isn't working label Apr 8, 2021
@brendanfalk
Copy link
Member

Hmmm. I don't seem to be able to reproduce... Let me try again tomorrow morning as maybe I am missing something obvious here. Will also try on different computers.

Thank you again for reporting.

@mschrage
Copy link
Member

@yebrahim are you still running into this issue? If yes, let's set up sometime to jump on call, so we can debug together. 🤗 https://calendly.com/mschrage/30min

@yebrahim
Copy link
Author

Perhaps this might help, note this only happens on bash. At the start of the screencast is zsh, things work fine, when I switch to bash things break.
In the first attempt in bash I pressed Tab, Fig replaced the last word when hitting Tab. The second attempt (upper case) it didn't replace in-line, but removed it when I hit Enter.

Hope this helps.

Screen.Recording.2021-04-13.at.9.41.41.PM.mov

@mschrage
Copy link
Member

This is helpful. The setopt error you are getting makes me suspicious that something could be broken in the bash integration we have?

Can you open ~/.fig/fig.bash and comment out the line trap '$(fig bg:exec $$ $(tty) &)' DEBUG.

After that, if you open a new terminal, does the issue still happen?

@yebrahim
Copy link
Author

Didn't seem to make a difference. :(

@withfig-bot withfig-bot added the shell:bash Issues related to Bash label Jun 17, 2021
@mschrage
Copy link
Member

I am going to close this issue since it is quite old and I believe it has been fixed. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell:bash Issues related to Bash type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants