Skip to content

Tab-complete keywords in REPL#1267

Merged
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:fix1265
Dec 7, 2025
Merged

Tab-complete keywords in REPL#1267
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:fix1265

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

Make it smart enough to turn:

  • wh<TAB> into while (
  • tr<TAB> into try {
  • th<TAB> into this.
  • etc.

Fixes: #1265

Comment thread repl.js
Copy link
Copy Markdown
Contributor

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think instanceof is missing?

@bnoordhuis
Copy link
Copy Markdown
Contributor Author

I think instanceof is missing?

Uh yeah, the thing that started it all 🤦

Added, together with typeof.

Comment thread repl.js Outdated
Comment thread repl.js Outdated
Make it smart enough to complete:

- `wh<TAB>` to `while (`
- `tr<TAB>` to `try {`
- `th<TAB>` to `this` and then `this<TAB>` to `this.`
- etc.

But don't complete object properties that way.

Fixes: quickjs-ng#1265
@bnoordhuis bnoordhuis merged commit fa9472d into quickjs-ng:master Dec 7, 2025
122 checks passed
@bnoordhuis bnoordhuis deleted the fix1265 branch December 7, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tab-complete keywords in REPL

3 participants