nnn: nnn hangs on -p option with list input
nnn works as expected when piping a list of paths delimited by NUL, and works fine when using the -p - option (prints selection to stdout), but for some reason hangs indefinitely when trying to use both operations at the same time. When it hangs, my CPU heats up quite badly and it appears to be stuck in an infinite loop.
Environment details
- Operating System: Linux arch 5.6.6-arch1-1
- Desktop Environment: None (i3-wm)
- Terminal Emulator: Termite
- Shell: zsh, bash, dash
- Custom desktop opener (if applicable):
- Program options used:
-p - Configuration options set:
- Issue exists on
nnnmaster
Exact steps to reproduce the issue
Run the following command in any directory:
find . -print0 | nnn -p -
Preview (nnn from master, compiled with O_DEBUG=1, all config variables unset, with screenkey):

Log file: /tmp/nnndbg.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (13 by maintainers)
Commits related to this issue
- Fix #532: support picker and list modes together — committed to jarun/nnn by jarun 4 years ago
- Fix #532: support picker and list modes together — committed to jarun/nnn by jarun 4 years ago
- Fix #532: support picker and list modes together — committed to toddyamakawa/nnn by jarun 4 years ago
This should be fixed in master now.
Note: I did a force push to keep the changes together. Please re-fork.
@KlzXS does the following patch make sense?
@Randoragon if @KlzXS confirms, can you please test if it works as you expect?