Enable paths autocompletion for VM CLI #1131

Open
opened 2025-12-28 17:15:20 +00:00 by sami · 0 comments
Owner

Originally created by @AnnaShaleva on GitHub (May 16, 2023).

Initially suggested in https://github.com/nspcc-dev/neo-go/issues/2993, ref. #3013 also.

We use the a separate github.com/chzyer/readline` library to read user input, and this library doesn't provide enough functionality for proper dynamic paths auto completion. I was able to properly autocomplete the top-level paths only (as presented in the example), going deeper causes too much kludges and doesn't work good. The problem with readline library is that it doesn't allow dynamic paths traversal during the program execution time (only to construct the full directories structure at the start of the program, but it can be really huge). Another problem is in handling relative paths.

Either we need to find a way to dynamically construct the file tree at the runtime or we need to use some other library for this (and maybe even replace readline library).

Originally created by @AnnaShaleva on GitHub (May 16, 2023). Initially suggested in https://github.com/nspcc-dev/neo-go/issues/2993, ref. #3013 also. We use the a separate [github.com/chzyer/readline`](https://github.com/chzyer/readline) library to read user input, and this library doesn't provide enough functionality for proper dynamic paths auto completion. I was able to properly autocomplete the top-level paths only (as presented in the [example](https://github.com/chzyer/readline/blob/7f93d88cd5ffa0e805d58d2f9fc3191be15ec668/example/readline-demo/readline-demo.go#L39)), going deeper causes too much kludges and doesn't work good. The problem with readline library is that it doesn't allow dynamic paths traversal during the program execution time (only to construct the full directories structure at the start of the program, but it can be really huge). Another problem is in handling relative paths. Either we need to find a way to dynamically construct the file tree at the runtime or we need to use some other library for this (and maybe even replace readline library).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1131
No description provided.