Giter Site home page Giter Site logo

Comments (6)

jcubic avatar jcubic commented on May 13, 2024

Yes, good to have those. I think that proper behavior should be: if you put initial list of commands and pass object as first argument then it shouldn't expand initial values, but should exand values after first argument so it will act the same as in bash when you can expand filenames or makefile rules. And the value of command list could be a function too, so completion will be dynamic and the values could be taken from ajax call. And I aslo must add completion into json-rpc call. I improve my json-rpc library (and added JS part), and put it into own repo I should use it in terminal.

from jquery.terminal.

mgedmin avatar mgedmin commented on May 13, 2024

For my particular use case I do not want completion of arguments, I want completion of commands.

Eventually it would be nice to be able to supply a custom completion function, I suppose, but I'm not interested in providing a patch for that at this time. ;)

from jquery.terminal.

jcubic avatar jcubic commented on May 13, 2024

I just post what other things should be done here, and that your simple
solution is not enough and I will need to write it. I don't expect that
you do this if you already have what you want.

On Mon, 30 Jan 2012 15:58:44 -0800
Marius Gedminas
[email protected]
wrote:

For my particular use case I do not want completion of arguments, I
want completion of commands.

Eventually it would be nice to be able to supply a custom completion
function, I suppose, but I'm not interested in providing a patch for
that at this time. ;)


Reply to this email directly or view it on GitHub:
#14 (comment)

Jakub Jankiewicz
twitter: @jcubic
www: http://jcubic.pl

from jquery.terminal.

usmanajmal avatar usmanajmal commented on May 13, 2024

Is there any plan of supporting bash like tab-completion in near future?

from jquery.terminal.

jcubic avatar jcubic commented on May 13, 2024

Yes, there will be, right now it's like in bash but there is no API for it, it's only for object as first argument (I need to change JSON-RPC library and use completion for RPC too). You can check how Dhruv Matani use tilda with tab completion on his site http://dhruvbird.com/ he did it before I implement it, you can also check the source code - line 2194 (it's only few lines of code) to see how object completion is implemented, and you can overwrite TAB key on keydown and do your own completion (you will also need to copy this if statement - line 2178 and tab_count need to be defined ousite keydown function - everything in the same keydown handler)

I will add this when I find some free time.

from jquery.terminal.

jcubic avatar jcubic commented on May 13, 2024

I decide to use one callback function in main options and in push command in this commit ef84a7c

completion: function(term, string, callback) {
    callback(['foo', 'bar', 'baz']);
}

from jquery.terminal.

Related Issues (20)

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.