Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion doesn't escape spaces #35

Open
GijsTimmers opened this issue Oct 17, 2014 · 2 comments
Open

Autocompletion doesn't escape spaces #35

GijsTimmers opened this issue Oct 17, 2014 · 2 comments

Comments

@GijsTimmers
Copy link
Collaborator

Expected behaviour:

$ pwd
  /mnt/Data
$ cd Muziek/Franki<TAB>
$ cd Muziek/Frankie Knuckles\ -\ Beyond\ The\ Mix/
$ pwd
  /mnt/Data/Muziek/Frankie Knuckles - Beyond The Mix/

Actual behaviour:

$ pwd
  /mnt/Data
$ cd Muziek/Franki<TAB>
$ cd Muziek/Frankie Knuckles - Beyond The Mix/        ## No escaping!
  [DEBUG: You entered: 'cd Muziek/Frankie Knuckles - Beyond The Mix/']
  [DEBUG: alias: input resolved to: 'cd Muziek/Frankie Knuckles - Beyond The Mix/']
  jsh: cd: wrong number of arguments    (expected = 1)
  [DEBUG: built-in: executed 'cd']
  [DEBUG: freeing comd struct for 'cd']
  [DEBUG: parseexpr: expr evaluated with return value 1]
  [DEBUG: readcmd: freeing memory for: 'cd']
$ pwd
  /mnt/Data
@jovanbulck
Copy link
Owner

I've been hacking on this yesterday. See this branch. After lots of trouble I managed to get something working, sort of... I looked into the source code of bash and copied some code of it, trying to understand the autocompletion API of readline, which really sucks. :/ I managed to get autocompletion escaping spaces working for single matches, but somehow it all breaks when multiple matches are found (restarts at the beginning).

Anyone who feels like working further on this --> go ahead! I guess we need some help on this (e.g. Stackoverflow) since I clearlly don't understand the API well enough...

In this branch you'll allo find a solution for the case insensitive completion, as discussed in issue #16 . At least something that's working :-)

@jovanbulck
Copy link
Owner

See issue #51 for further discussion

Repository owner locked and limited conversation to collaborators Oct 31, 2014
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

2 participants