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] nnn can't return after executing command (] key) if invoked from a bind -x keybinding. #1884

Closed
9 tasks done
magpie514 opened this issue May 13, 2024 · 4 comments
Closed
9 tasks done

Comments

@magpie514
Copy link

magpie514 commented May 13, 2024

Environment details (Put x in the checkbox along with the information)

  • Operating System: Ubuntu 23.10 (amd64)
  • Desktop Environment: Plasma 5
  • Terminal Emulator: Konsole 23.08.3
  • Shell: bash 5.2.15
  • Custom desktop opener (if applicable): N/A
  • Program options used: none
  • Configuration options set:
export NNN_COLORS='1324'
export NNN_FCOLORS='0000030A0000060805000009'
  • Plugins are installed
  • Issue exists on nnn master

Exact steps to reproduce the issue

  1. bind -x ' "\eo":"nnn" ' (for example)
  2. Press alt+o to run nnn
  3. Press ] to open the command prompt
  4. Run a command such as git pull
  5. After command is finished, it'll get stuck and unable to return.
  6. Process has to be killed by external means (kill, pkill, GUI task managers, closing the tab, etc)

Additional notes

I have nnn compiled with this script:

cd ~/Repositories/nnn
git fetch origin && git reset --hard origin/master && git clean -ffdx
make O_STATIC=1 O_NORL=1 O_EMOJI=1 strip
sudo cp ./nnn /usr/local/bin/nnn
  • GCC version: gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
  • No additional patches or modifications to nnn's source.
  • It does work with bind '"\eo":"nnn\n"' but this requires the prompt to be fully cleared and is added to history.
@magpie514 magpie514 added the bug label May 13, 2024
@N-R-K
Copy link
Collaborator

N-R-K commented May 13, 2024

After command is finished, it'll get stuck and unable to return.

Ctrl+c worked for me.

@magpie514
Copy link
Author

Tried ctrl+c as one of the first things, it doesn't work for me. Neither does ctrl+z or other control keys.

@N-R-K
Copy link
Collaborator

N-R-K commented May 14, 2024

This seems to be a issue with bash bind: https://stackoverflow.com/questions/16928761/why-will-a-script-not-accept-input-on-stdin-when-invoked-from-bashs-bind

Not sure if there's anything to be done on nnn's side.

@magpie514
Copy link
Author

Good find. Yeah seems it's not nnn's fault, better close this one.
Thanks for your assistance!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
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