Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#737: Added cd command to shell commandlet #748

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

leonrohne27
Copy link
Contributor

Fixes: #737

Implements:

  • Added the command "cd" to the shell commandlet that allows the user to switch the directory inside the ide shell

Added the command cd to the shell commandlet that allows the user to switch the directory inside the ide shell
@coveralls
Copy link
Collaborator

coveralls commented Nov 7, 2024

Pull Request Test Coverage Report for Build 11933038763

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 53 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 67.142%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/commandlet/ShellCommandlet.java 53 3.21%
Totals Coverage Status
Change from base Build 11932927810: -0.1%
Covered Lines: 6396
Relevant Lines: 9183

💛 - Coveralls

Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

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

Thanks for implementing the cd command to our Shell. I've added some CRs, please resolve.

private int changeDirectory(CliArguments cliArgs) {
if (!cliArgs.hasNext()) {
this.context.error("Error: 'cd' requires a directory argument.");
return -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about the error code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be fine now.

leonrohne27 and others added 6 commits November 19, 2024 10:23
added current working directory path to prompt name
improved existing directory check
adjusted exit codes
removed whitespace from ide prompt
Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM. Ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

Add cd command to shell commandlet
4 participants