Skip to content

fix: hint shell builtins in command-not-found error (fixes #1944)#2005

Closed
leno23 wants to merge 3 commits into
sharkdp:masterfrom
leno23:fix/shell-builtin-hint-1944-clippy
Closed

fix: hint shell builtins in command-not-found error (fixes #1944)#2005
leno23 wants to merge 3 commits into
sharkdp:masterfrom
leno23:fix/shell-builtin-hint-1944-clippy

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 16, 2026

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_tests
  • cargo clippy -- -D warnings

Made with Cursor

kimjune01 and others added 3 commits May 9, 2026 10:09
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>
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 16, 2026

All CI checks are green and the branch is mergeable with master. Still happy to close this in favor of #1994 if that PR picks up the contains() clippy fix — just offering a ready-to-merge option for #1944.

@tmccombs tmccombs closed this May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'command not found' when running fd with -x cd

3 participants