Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

repl: don't auto-complete array indices #5734

Closed
bnoordhuis opened this issue Jun 23, 2013 · 1 comment
Closed

repl: don't auto-complete array indices #5734

bnoordhuis opened this issue Jun 23, 2013 · 1 comment

Comments

@bnoordhuis
Copy link
Member

$ node
> process.versions.node
'0.11.3-pre'
> var a = [1,2,3]
> a.<TAB>
a.__defineGetter__      a.__defineSetter__      a.__lookupGetter__      a.__lookupSetter__      a.__proto__
a.constructor           a.hasOwnProperty        a.isPrototypeOf         a.propertyIsEnumerable  a.toLocaleString
a.toString              a.valueOf               

a.concat                a.constructor           a.every                 a.filter                a.forEach
a.indexOf               a.join                  a.lastIndexOf           a.length                a.map
a.pop                   a.push                  a.reduce                a.reduceRight           a.reverse
a.shift                 a.slice                 a.some                  a.sort                  a.splice
a.toLocaleString        a.toString              a.unshift               

a.0                     a.1                     a.2                     a.length
> a.0
...

The current auto-completion is:

  • not very useful because a.0 is not a valid syntactic construct, and
  • annoying when the array is large - the REPL lists all indices and you can't interrupt it
@brendanashworth
Copy link

See: nodejs/node#2409 which landed as nodejs/node@ce145bf. It is currently marked for a 0.10 and 0.12 backport, so I don't know if this issue is still relevant.

@Trott Trott closed this as completed Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants