-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Autocomplete filenames for fs
functions in repl
#17764
Comments
+1 on it. But there is a little difficulty to implement 100% of the feature. Now we are using regular expression to match the code we want to autocomplete. It's easy to match something like But consider the following in REPL: > var { readFileSync } = require('fs');
> readFileSync('./ Or even odder: > var { readFileSync: foo } = require('fs');
> foo('./ We cannot use a single regular expression to match these. The most direct way is to match all the strings starting with But is it worth to do it? |
@starkwang I'm fine with only solving this for people explicitly typing |
Just noting that auto-completion of file names in large directories will freeze the REPL until #15699 is resolved. |
This should now be unblocked by #22020. |
Fixed in #26648 |
If I type the following code into the repl, and then press
tab
, a list of autocomplete suggestions appears for therequire
-able files in the current directory:It would be nice if a similar thing would happen when calling methods like
fs.readFileSync
. Specifically, after typing the following code, I would want the REPL to autocomplete with all existing files in the current directory:This would be useful when using the REPL to process/view a file.
The text was updated successfully, but these errors were encountered: