Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: GLOB_COMPLETE and numbered directories
- X-seq: zsh-users 20026
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: GLOB_COMPLETE and numbered directories
- Date: Thu, 19 Mar 2015 09:06:12 -0700
- In-reply-to: <20150319073238.GN3548@tarsus.local2>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20150319073238.GN3548@tarsus.local2>
On Mar 19, 7:32am, Daniel Shahaf wrote:
} Subject: GLOB_COMPLETE and numbered directories
}
} Consider the following:
}
} % mkdir -p {bar,baz}/iota
} % cat b/i<TAB>
} [cycles between 'cat ba<CURSOR>/iota', 'cat bar/iota/', 'cat baz/iota/']
Not what I see here.
- First tab does ba<C>/iota
- Second tab shows list of bar/iota baz/iota below ba<C>/iota
- Third tab begins cycling bar/iota/ and baz/iota/
} % mkdir -p {10a,11a}/iota
} % cat 1/i<CURSOR>
} [press <TAB>]
} % cat 1<CURSOR>a/iota
} [press <TAB>]
} % cat 1a/iota<CURSOR>
} [stays the same upon pressing TAB]
}
} I expected the second <TAB> press to offer me the possible completions
} '10a' '11a'.
With only glob_complete, it works by appending a * to the end of the word,
not by inserting a * at the cursor position. 1a*/iota* doesn't match
anything.
Any time the cursor is left in the middle of a word, it means that the
completion system is waiting for you to type a disambiguating character.
} I'd at least like not to be left with "1a/iota<CURSOR>"
It's supposed to be sufficient to "setopt completeinword" to get the
behavior you want, and indeed it works if I literally type out
% cat 1a/iota
and then move the cursor to 1<C>a/iota before pressing TAB. However,
for some reason this doesn't happen when "continuing an in-progress
completion" with a second TAB. I believe that's because the second
tab just regenerates the listing with the same pattern as on the
first tab, and that's not sufficient to disambiguate.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author