Giter VIP home page Giter VIP logo

Comments (5)

 avatar commented on June 3, 2024

From [email protected] on July 03, 2012 00:24:37

oops - sorry - step 1 should say 'md "a test dir"' to create the directory.

from clink.

 avatar commented on June 3, 2024

From [email protected] on July 06, 2012 04:40:04

I had worked on this but decided to disable it until I can improve it a little (See "#if 0" in postprocess_matches() in clink_rl.c).

Readline can behave a little strange because it wants to escape spaces where as cmd.exe uses quotes instead. Finding a middle ground is hard. Perhaps using cmd.exe's escape character "^" would work.

Status: Accepted
Owner: [email protected]

from clink.

 avatar commented on June 3, 2024

From [email protected] on July 26, 2012 20:01:59

Martin -

What are the use cases that should be handled? I've got the #if 0 code compiled in and it seems to work okay.. I'm willing to test and hack a bit if given a few more details.

from clink.

 avatar commented on June 3, 2024

From [email protected] on July 27, 2012 01:36:38

The main reason I've disabled it is because readline's not really designed for quoted strings straight out of the box. It prefers to escape them instead (as seen in Bash) so injecting quote chars into matches is fighting against readline somewhat.

Enabling the #if 0 in clink_rl.c gives two behaviours I am unhappy with and wanted to address before considering this issue fixed;

  1. Completion ends too early. Best to illustrate this with an example; 'c:>cd "\program files (x'. Readline will complete the remaining '86)', but rather than appending a , it'll close the quote and consider completion finished. This is rather annoying!
  2. Procedurally adding the quote character is a little disorientating to the user, and also requires the user to press TAB three times to see matches (I think double-tapping TAB is a common operation for seasoned "readliners"). Consider 'c:>cd ' - pressing tab adds a quote to the line, completion state is reset to the beginning as if the user typed the quote - room for improvement in my opinion.
  3. Users who've written custom match generators in Lua may not want this behaviour.

My plan for this issue was to fix 1, and find a way to improve the unusual user experience in 2, and add support to skip it for 3.

Further more, I'd like to have the option to use cmd.exe's escape character '^' to escape spaces instead (e.g. c:\program^ files^ (x86)). It's the standard readline way done through the rl_filename_(de)quoting_function hooks I believe. One benefit is that it saves users from having to close the quote. However it's strange so should be optional and off by default.

That was quite a ramble, hopefully coherent. Feel free to hack away at any of this if you'd like :). Patches are most certainly welcome.

from clink.

 avatar commented on June 3, 2024

From [email protected] on August 02, 2012 14:45:43

Will be in 0.2.

Status: Fixed

from clink.

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.