Skip to content

fixed icd 'closing brace expected' issue#1960

Open
shodiBoy1 wants to merge 2 commits into
devonfw:mainfrom
shodiBoy1:bug/1185-icd-zsh-fix
Open

fixed icd 'closing brace expected' issue#1960
shodiBoy1 wants to merge 2 commits into
devonfw:mainfrom
shodiBoy1:bug/1185-icd-zsh-fix

Conversation

@shodiBoy1
Copy link
Copy Markdown
Contributor

@shodiBoy1 shodiBoy1 commented May 20, 2026

This PR fixes #1185

Implemented changes:

  • Replaced bash-only ${1::1} shortcut with the POSIX-extended ${1:0:1} form in cli/src/main/package/functions (L34 and L59). Same first-character extraction, but parses in every zsh version (5.8.1 errored with "closing brace expected"; 5.9+ accepts both).

Testing instructions

  1. Update IDEasy to this branch (or copy the patched functions file into your installation).
  2. Open a fresh Terminal (zsh).
  3. Run:
    -icd -h -> prints usage (was: icd:1: closing brace expected)
    -icd -p <project> -w <workspace> -> cd's into the workspace (was: icd:26: closing brace expected)

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful
  • 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"

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 20, 2026

CLA assistant check
All committers have signed the CLA.

@shodiBoy1 shodiBoy1 moved this from 🆕 New to 🏗 In progress in IDEasy board May 20, 2026
@shodiBoy1 shodiBoy1 added macOS specific for Apple MacOS icd Changes related to our icd command. labels May 20, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 20, 2026

Coverage Report for CI Build 26283358163

Coverage increased (+0.004%) to 71.119%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/version/VersionSegment.java 1 89.76%

Coverage Stats

Coverage Status
Relevant Lines: 15566
Covered Lines: 11547
Line Coverage: 74.18%
Relevant Branches: 6954
Covered Branches: 4469
Branch Coverage: 64.27%
Branches in Coverage %: Yes
Coverage Strength: 3.14 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@shodiBoy1 thanks for your PR. Fix looks sane to me. Seems that old bash on x86 mac does not support the short :: form so you make it more explicit and therefore old bash version compatible. 👍
You can add the CHANGELOG entry and take the PR ready for review so I can merge.

@github-project-automation github-project-automation Bot moved this from 🏗 In progress to 👀 In review in IDEasy board May 21, 2026
@shodiBoy1 shodiBoy1 marked this pull request as ready for review May 21, 2026 21:43
@shodiBoy1
Copy link
Copy Markdown
Contributor Author

@hohwille all done , can be merged!

@hohwille
Copy link
Copy Markdown
Member

hohwille commented May 22, 2026

@shodiBoy1 we have some CLA issues. Seems you mixed commits from different emails/accounts.
Can you fix that or squash everything a a new PR? Or if possible sign the CLA also with your 2nd account.

@shodiBoy1 shodiBoy1 force-pushed the bug/1185-icd-zsh-fix branch from 7cd5a81 to f000bd0 Compare May 22, 2026 10:46
@shodiBoy1
Copy link
Copy Markdown
Contributor Author

@hohwille cla is fixed, i tested and pushed directly from my mac intel thats why i guess cla didnt pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

icd Changes related to our icd command. macOS specific for Apple MacOS

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

icd on mac does not work in zshell

4 participants