Commit Graph

31 Commits

Author SHA1 Message Date
Snarling
e0272ad4af
FILES: Path rework & typesafety (#479)
* Added new types for various file paths, all in the Paths folder.
* TypeSafety and other helper functions related to these types
* Added basic globbing support with * and ?. Currently only implemented for Script/Text, on nano and download terminal commands
* Enforcing the new types throughout the codebase, plus whatever rewrites happened along the way
* Server.textFiles is now a map
* TextFile no longer uses a fn property, now it is filename
* Added a shared ContentFile interface for shared functionality between TextFile and Script.
* related to ContentFile change above, the player is now allowed to move a text file to a script file and vice versa.
* File paths no longer conditionally start with slashes, and all directory names other than root have ending slashes. The player is still able to provide paths starting with / but this now indicates that the player is specifying an absolute path instead of one relative to root.
* Singularized the MessageFilename and LiteratureName enums
* Because they now only accept correct types, server.writeToXFile functions now always succeed (the only reasons they could fail before were invalid filepath).
* Fix several issues with tab completion, which included pretty much a complete rewrite
* Changed the autocomplete display options so there's less chance it clips outside the display area.
* Turned CompletedProgramName into an enum.
* Got rid of programsMetadata, and programs and DarkWebItems are now initialized immediately instead of relying on initializers called from the engine.
* For any executable (program, cct, or script file) pathing can be used directly to execute without using the run command (previously the command had to start with ./ and it wasn't actually using pathing).
2023-04-24 10:26:57 -04:00
Snarling
0df984eea0
CODEBASE: Add Jsonable Map and Set types, move player.sourceFiles to a map (#473) 2023-04-18 03:19:45 -04:00
Snarling
6290ce562a
Prevent errors thrown from terminal (#443)
At least from getFilepath function
2023-03-23 12:01:58 -04:00
Tim Hesse
7121b456f4 fix: nano does not open root script if cd'd into a dir 2022-10-09 14:49:18 +02:00
Snarling
83d357e758 commit1 2022-09-27 15:35:40 -04:00
Olivier Gagnon
810f3a87b9 rm more anys 2022-07-19 21:53:43 -04:00
Chris380
bfa19eb7ba Make .lit and .msg files clickable 2022-04-14 16:23:45 +02:00
Olivier Gagnon
48f80f25d6 fmt and lint 2022-04-06 19:30:08 -04:00
hydroflame
d2dedace2e
Merge pull request #3152 from Master-Guy/issues/1944
Issues/1944
2022-03-20 14:21:28 -04:00
Master-Guy
2871bba379 Review comments by ApamNapat 2022-03-17 22:25:30 +01:00
Master-Guy
e0377980a5
Merge branch 'dev' into issues/1944 2022-03-17 18:29:18 +01:00
Master-Guy
a575c0cfe3 Tabelize linked output of ls 2022-03-17 17:50:39 +01:00
Master-Guy
93f4c499d4 Quick fix to prevent division by 0 2022-03-17 16:56:32 +01:00
Master-Guy
59ec6213b9 Processed review comments 2022-03-17 13:17:43 +01:00
BB
5e2ccc71ec Mixing spaces and tabs, extra semicolons and lonely ifs are now forbidden 2022-03-11 16:32:48 +01:00
BB
2c3e0985c4 Simplified some relative imports 2022-03-06 05:05:55 +01:00
phyzical
d41b19bced added support for ls -l 2022-02-06 00:05:48 +08:00
phyzical
9a3731cf18 updated grep for ls
* implemented flags logic for grep
* added --grep and -g
* updated docs
2022-02-05 23:27:08 +08:00
smolgumball
cb82907817 Fix issues with timestamps on same line as clickable script rows in ls 2022-01-15 21:29:12 -07:00
smolgumball
c8db709287 Add hostname safety 2022-01-10 21:00:52 -07:00
smolgumball
358f5ee8ee Add simple clickable links to ls command
Only supports `nano` as I couldn't figure out how to infer `vim`
support without an explicit `nano` or `vim` command being run.
2022-01-10 20:40:02 -07:00
MageKing17
1dcc17c4fb
Update ls.tsx
`args[numArgs - 1]` is the last argument in the list, so correct usage was being flagged as incorrect, and incorrect usage wasn't working anyway because the filter was `"undefined"`.

Additionally, the function seemed confused as to whether or not `ls` counted as an argument (AFAICT, it isn't).

Fixes #1994.
2021-12-18 21:22:34 -08:00
Olivier Gagnon
13b08d7cc8 terminal parses boolean exactly. 2021-12-03 14:44:32 -05:00
Olivier Gagnon
3112dc60c0 few more bugfixes 2021-11-11 23:28:08 -05:00
Olivier Gagnon
f92db3b8f8 fix ram miscalc 2021-10-27 19:10:15 -04:00
Olivier Gagnon
504ee46950 terminal colors 2021-10-26 20:26:05 -04:00
Olivier Gagnon
e245c2d3a7 fixed a few things 2021-10-14 02:07:05 -04:00
Olivier Gagnon
43f0746be7 fix ls not working on dir 2021-09-22 00:48:13 -04:00
Olivier Gagnon
89ea9aaff5 oops 2021-09-17 02:58:02 -04:00
Olivier Gagnon
18f40a8d9f fix lint 2021-09-16 18:10:28 -04:00
Olivier Gagnon
2922e42055 most terminal converted to ts 2021-09-16 18:10:28 -04:00