Giter Site home page Giter Site logo

Add auto-completion about console.js HOT 8 CLOSED

fnky avatar fnky commented on September 13, 2024
Add auto-completion

from console.js.

Comments (8)

amio avatar amio commented on September 13, 2024

Nice feature,

Well it seems this intractive needs more code than the core function, and I prefer to keep it simple.
I think console.js was meant to be like a game console, or use to add some debug utillity, easter egg,
these use cases are simple, auto-completion is nice, but not necessary, a handy help helper may archive same goal but more lightweight.

If in your case it is necessary, let me know :)

And besides, maybe we could add a plugin api for that?

from console.js.

fnky avatar fnky commented on September 13, 2024

Sure it would be awesome with plugin, but that also increases complexity. The idea was to replicate the console in Quake 3. It doesn't have to be anything fancy.

I did at one time implement auto completion in my own replication of a Quake console which I made a long while ago. I'll see if I can dig it up from the dust.

from console.js.

amio avatar amio commented on September 13, 2024

Oh I got it, I was thinking about tab effect of fish.
This should be simple enough:

# history commands
set # => TAB = SETNAME

and

# history commands
  - SAY say something
  - SETNAME set user name
s # => TAB = show those hints.

from console.js.

amio avatar amio commented on September 13, 2024

btw, I can't remember how the tab works in Quake 3,
could you provide some screenshot or video or so, showing how the tab exactly acting in Quake 3?

from console.js.

fnky avatar fnky commented on September 13, 2024

When typing e.g. sv and tabbing it will show a list of commands and auto complete to ยดsv_ยด, because there's multiple commands starting with sv_

second

If continuing typing e.g. sv_che and a single command starts with sv_che it will auto complete to sv_cheats

fourth

Same as the first example if typing e.g. g_e it will auto complete to g_enable and show a list of commands starting with that.

sixth

For the sv_cheats example, it will not show a list but simply just auto complete. For all commands, it will also auto complete the \ which is the console prefix for commands so typing sv_che and pressing TAB will auto complete to \sv_cheats

from console.js.

amio avatar amio commented on September 13, 2024

๐Ÿ‘

from console.js.

amio avatar amio commented on September 13, 2024

ping @fnky See if it works as expected http://gh.amio.us/console.js/

from console.js.

fnky avatar fnky commented on September 13, 2024

@amio That works wonderfully. Nice job!

from console.js.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.