Sunday | 23 JUN 2024
[ previous ]
[ next ]

EVA and NSH Update - 1

Date: 2023-03-15

I added support for Linux file paths in EVA and this then led to adding support for file paths in NSH as well. This was because being unable to tab complete file paths would be a big annoyance.

I'm happy with how this turned out as everything was relatively localized though far reaching. Which now that I saw it is contradictory but take my word for it. For EVA it involved adding a few different flags, IS.OS.FILE, IS.UNIVERSE.FILE and CREATE.OS.FILE. These flags are then used to flip behavior. I had a few different places to add the logic but the logic itself is well contained. I'm also happy that everything just worked, the UNDO stack and syntax highlighting worked out of the box.

Adding linux file paths to NSH was also straightforward, it involved shelling out to linux to get a listing of files and then my autocomplete logic runs against it. This is actually quite nice. I can also think of extending the autocomplete logic as I can select anything I want to provide completions.

I'm also very happy that I decided to go the generic route for NSH, I was originally going to have my file path logic run if it was EVA but instead made it so that / triggers the logic. Anything starting with a / will be assumed to be a path and will get suggestions. This makes it very handy for the OPEN command I route.

Surprisingly very easy to add this to my editor and shell and I'm looking for opportunities to use it in the wild. Currently I haven't had to yet so I'm sure there are bugs.