cmderdev / cmderdev/cmder

[Bug] command such as `ls`、`grep`、`where` not found in bash

Open
#3,022 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐛 Type: Bug 🤝 Help wanted
Dominant language
PowerShell
Stars
27k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

Version Information
Cmder version: 1.3.25
Operating system: windows10 22h2
Cmder Edition

Cmder Full (with Git)

Description of the issue

I installed cmd-full by scoop. Then when I open cmder and use mitty or bash, it shows that bash: /c/Users/cffex/scoop/apps/cmder-full/current/vendor/git-for-windows/bin/cp: cannot execute: required file not found.

When I try to run ls, it shows that bash: /c/Users/cffex/scoop/apps/cmder-full/current/vendor/git-for-windows/bin/ls: cannot execute: required file not found. When I try /usr/bin/ls or /bin/ls, the command works, and when I try /usr/bin/ls /c/Users/cffex/scoop/apps/cmder-full/current/vendor/git-for-windows/bin, there
are lots of exe files such as ls.exe, but I can only find bash.exe and git.exe and sh.exe in windows file explorer.

When I try to run /usr/bin/which ls, it shows that /c/Users/cffex/scoop/apps/cmder-full/current/vendor/git-for-windows/bin/ls.

How can I fix this problem? I don't want to type /usr/bin/ls every time I want to use the ls command.

How to reproduce

No response

Additional context

No response

Checklist
  • I have read the documentation.
  • I have searched for similar issues and found none that describe my issue.
  • I have reproduced the issue on the latest version of Cmder.
  • I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the command lookup in Cmder Full's bundled Git for Windows bin path, using bare ls, /usr/bin/ls, and /usr/bin/which ls as described. Trace why the bundled ls.exe and similar commands are selected but cannot execute; done means commands such as ls, grep, and where run without requiring /usr/bin/ prefixes.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, git
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.