ProzillaOS/src/features/apps/terminal/commands/pwd.js
2024-05-05 11:27:53 +02:00

13 lines
No EOL
295 B
JavaScript

import Command from "../command";
export const pwd = new Command()
.setManual({
purpose: "Display path of the current directory"
})
.setExecute(function(args, { currentDirectory }) {
if (currentDirectory.root) {
return "/";
} else {
return currentDirectory.absolutePath;
}
});