diff --git a/commands/cat.js b/commands/cat.js index 79b4ecd..1bad665 100644 --- a/commands/cat.js +++ b/commands/cat.js @@ -1,6 +1,7 @@ -export {}; /// // @ts-check +export {}; + if (!args[1]) { throw 'No path provided'; } diff --git a/commands/cd.js b/commands/cd.js index d934969..1613b80 100644 --- a/commands/cd.js +++ b/commands/cd.js @@ -1,4 +1,4 @@ -export {}; /// // @ts-check +export {}; __open(args[1] || path.resolve('.'), true); diff --git a/commands/chmod.js b/commands/chmod.js index 89b6450..931a466 100644 --- a/commands/chmod.js +++ b/commands/chmod.js @@ -1,6 +1,6 @@ -export {}; /// // @ts-check +export {}; const [command, mode, filePath] = args; diff --git a/commands/cp.js b/commands/cp.js index 0c0ff98..a06793f 100644 --- a/commands/cp.js +++ b/commands/cp.js @@ -1,6 +1,6 @@ -export {}; /// // @ts-check +export {}; if (args.length != 3) { throw 'Incorrect number of arguments'; } diff --git a/commands/echo.js b/commands/echo.js index fcb2510..afa6f0f 100644 --- a/commands/echo.js +++ b/commands/echo.js @@ -1,4 +1,4 @@ -export {}; /// // @ts-check +export {}; terminal.writeln(args.slice(1).join(' ')); diff --git a/commands/help.js b/commands/help.js index 5d5e592..297e981 100644 --- a/commands/help.js +++ b/commands/help.js @@ -1,4 +1,4 @@ -export {}; /// // @ts-check +export {}; terminal.writeln('Some unix commands available, ls /bin to see them.'); diff --git a/commands/ln.js b/commands/ln.js index 8d2d281..837b4f4 100644 --- a/commands/ln.js +++ b/commands/ln.js @@ -1,6 +1,6 @@ -export {}; /// // @ts-check +export {}; // Argument parsing const positionals = args.filter(arg => !arg.startsWith('-')).slice(1); diff --git a/commands/mkdir.js b/commands/mkdir.js index c634782..4d07be4 100644 --- a/commands/mkdir.js +++ b/commands/mkdir.js @@ -1,6 +1,6 @@ -export {}; /// // @ts-check +export {}; if (!args[1]) { throw 'No path provided'; } diff --git a/commands/mv.js b/commands/mv.js index cd4227a..147d75a 100644 --- a/commands/mv.js +++ b/commands/mv.js @@ -1,6 +1,6 @@ -export {}; /// // @ts-check +export {}; if (args.length != 3) { throw 'Incorrect number of arguments'; } diff --git a/commands/open-editor.js b/commands/open-editor.js index 9a954a5..67a227b 100644 --- a/commands/open-editor.js +++ b/commands/open-editor.js @@ -1,4 +1,4 @@ -export {}; /// // @ts-check +export {}; __editor_open(args[1]); diff --git a/commands/pwd.js b/commands/pwd.js index 38828f7..51d5a79 100644 --- a/commands/pwd.js +++ b/commands/pwd.js @@ -1,4 +1,4 @@ -export {}; /// // @ts-check +export {}; terminal.writeln(path.cwd); diff --git a/commands/rm.js b/commands/rm.js index 0aaf261..e5b9019 100644 --- a/commands/rm.js +++ b/commands/rm.js @@ -1,6 +1,6 @@ -export {}; /// // @ts-check +export {}; if (!args[1]) { throw 'No path provided'; } diff --git a/commands/touch.js b/commands/touch.js index b79fab2..39286cc 100644 --- a/commands/touch.js +++ b/commands/touch.js @@ -1,6 +1,6 @@ -export {}; /// // @ts-check +export {}; if (!args[1]) { throw 'No path provided'; } diff --git a/src/styles.css b/src/styles.css index 162ed4f..ff93aca 100644 --- a/src/styles.css +++ b/src/styles.css @@ -250,6 +250,7 @@ dialog { #terminal-container { position: absolute; inset: 5em 1em 1em; + overflow-y: scroll; } dialog.page {