fix: hint shell builtins in command-not-found error (fixes #1944)#2005
Closed
leno23 wants to merge 3 commits into
Closed
fix: hint shell builtins in command-not-found error (fixes #1944)#2005leno23 wants to merge 3 commits into
leno23 wants to merge 3 commits into
Conversation
When a user runs `fd -x cd` or similar shell builtins that lack standalone executables, the "Command not found" error now explains that the command is a shell builtin and suggests invoking it through a shell explicitly.
Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced May 16, 2026
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1944 with the same approach as #1994 by @kimjune01, plus a one-line clippy fix (
SHELL_BUILTINS.contains(&program)).Note on #1994
#1994 has the same feature but CI fails on
clippy::manual_contains. I’m happy to close this PR if #1994 is updated — opening this only so maintainers have a green CI option.Testing
cargo test builtin_testscargo clippy -- -D warningsMade with Cursor