Skip to content

#821: make ide prefix editable in ide shell to allow non-ide commands - #2288

Open
Ali-Shariati-Najafabadi wants to merge 2 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/821-remove-ide-prefix-shell
Open

#821: make ide prefix editable in ide shell to allow non-ide commands#2288
Ali-Shariati-Najafabadi wants to merge 2 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/821-remove-ide-prefix-shell

Conversation

@Ali-Shariati-Najafabadi

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #821

Implemented changes:

  • Made the ide prefix in ide shell part of the editable input line instead of a static, non-editable prompt segment, so it can be removed via backspace when entering non-IDEasy commands (e.g. cd)
  • Added ShellCommandlet.normalizeLine(String) to strip a leading ide from the input line so behavior for IDEasy commands (e.g. ide status) stays unchanged
  • Added ShellCommandletTest covering the new prefix-normalization behavior

Testing instructions

  1. Build the CLI and start ide shell
  2. Observe the prompt now shows only $ and the input line is pre-filled with ide which is editable
  3. Keep the prefix and type an IDEasy command, e.g. status (full line ide status) -> behaves the same as before (equivalent to typing status alone)
  4. Press backspace to remove ide and run a non-IDEasy command, e.g. cd ..-> works correctly without the misleading ide prefix
  5. Run mvn -Dtest=ShellCommandletTest test in the cli folder -> all tests pass

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful (except pre-existing unrelated failures, see testing instructions note)
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Aug 7, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi added enhancement New feature or request shell build-in shell with advanced completion ready-to-implement labels Aug 7, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi moved this from 🆕 New to 🏗 In progress in IDEasy board Aug 7, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 31150808432

Coverage increased (+0.06%) to 72.925%

Details

  • Coverage increased (+0.06%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 46 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

46 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/commandlet/ShellCommandlet.java 46 9.25%

Coverage Stats

Coverage Status
Relevant Lines: 17499
Covered Lines: 13306
Line Coverage: 76.04%
Relevant Branches: 7731
Covered Branches: 5093
Branch Coverage: 65.88%
Branches in Coverage %: Yes
Coverage Strength: 3.23 hits per line

💛 - Coveralls

@hohwille hohwille moved this from 🏗 In progress to Team Review in IDEasy board Aug 7, 2026

@samuelkos17 samuelkos17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again great work! I've ran through your testing instructions and everything works perfectly so I'll move this to In Review 😄

@samuelkos17 samuelkos17 moved this from Team Review to 👀 In review in IDEasy board Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request shell build-in shell with advanced completion

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Allow User to remove "ide " prefix in ide shell for non-IDEasy command

4 participants