ProzillaOS/src/features/apps/terminal/commands/pwd.ts
2024-05-07 21:06:07 +02:00

13 lines
No EOL
295 B
TypeScript

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;
}
});