-
Notifications
You must be signed in to change notification settings - Fork 521
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
crash when using the --cheatsh
option
#703
Comments
Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :) |
I reproduced the crash in a docker container after compiling from source on commit 537e2d6 I'm also on the currently latest commit for fzf:
|
works fine while
doesn't The output of
probably has some character combination that is confusing navi |
This seems to be the offending part, but I'm not exactly sure why: # The above is a useful demonstration of some pitfalls into which a user can
# fall, where the below is the above but corrected. Here is why:
#
# * The `.` (current working directory) is assumed when no path is provided.
# * Group syntax (parentheses) was used, but nothing was actually grouped.
# * A lot of people have their ls(1) command aliased in many ways, -
# potentially causing problems with the output and how xargs(1) handles it.
# By escaping the command, we temporarily override any aliases and even
# functions by the same name.
# * At least in my experience, the prior xargs(1) is not as reliable.
# * The `-print0` and `xargs -0` is great, but unnecessary (except when?).
#
# However, it might be more preferred to simply use find(1)'s own `-printf`
# flag, in order to avoid the need for xargs(1) and ls(1), which should be many
# times faster, and allows for more specificity.
find -perm -4000 -type f -print0 | xargs -I '{}' -0 \ls -l '{}' |
Describe the bug
navi crashes when using the
--cheatsh
option.To Reproduce
Run this shell command:
Press the
Up
arrow key to select the previous suggestion: navi crashes.Expected behavior
navi doesn't crash.
Screenshots
N/A
Versions:
Additional context
Here is a backtrace:
The text was updated successfully, but these errors were encountered: