Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cb2af2e

Browse files
committedOct 29, 2023
Added non argument option to ModuleChangeDirectory --> prints current directory
1 parent 89d386a commit cb2af2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/main/java/de/jo/modules/impl/files/ModuleChangeDirectory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
public class ModuleChangeDirectory implements Module {
1717
@Override
1818
public void run(String... args) throws Exception {
19-
if(args.length > 0) {
19+
if(args.length == 0) {
20+
System.out.println(ConsoleColors.YELLOW_BRIGHT+"> "+ConsoleColors.YELLOW+ConsoleTools.instance().currentDirectory.getCanonicalFile());
21+
} else {
2022
String fileName = args[0];
2123
// D: --> absolut path
2224
File newDir = fileName.charAt(1) == ':' ? new File(fileName) : new File(ConsoleTools.instance().currentDirectory, fileName);

0 commit comments

Comments
 (0)
Please sign in to comment.