zsh-workers
 help / color / mirror / code / Atom feed
* Broken completion on $prefix/*
@ 2010-03-10 20:02 Benjamin R. Haskell
  2010-03-11 16:27 ` Greg Klanderman
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin R. Haskell @ 2010-03-10 20:02 UTC (permalink / raw)
  To: Zsh Workers

I can't get file-completion in this context:

## define the variable '$prefix'
$ prefix=long/relative/path/to/stuff

## [slightly-OT]
## example of why that variable name made sense
## $ run-some-command --blah-dir $prefix/blah --arga-dir $prefix/arga

## example of where I wanted completion, but it didn't work
$ find $prefix/<Tab>
(shows completion for '/')

## Attempts with variable names $outputdir or $asdfdsa both work fine.
$ outputdir=$prefix
$ find $outputdir/<Tab>
(shows completion for 'long/relative/path/to/stuff')

$ asdfdsa=$prefix
$ find $asdfdsa/<Tab>
(shows completion for 'long/relative/path/to/stuff')

I assume this is an artifact of something localizing '$prefix' before 
its value is used for completion, but I don't see it right off.

Found using zsh 4.3.10 (patch level 1.4705) at work, but I'm pretty sure 
it's still present in latest git (assuming I'm setting up my fpath 
correctly on my home machine) and it's also in 4.3.4 (on an old server).

-- 
Best,
Ben


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Broken completion on $prefix/*
  2010-03-10 20:02 Broken completion on $prefix/* Benjamin R. Haskell
@ 2010-03-11 16:27 ` Greg Klanderman
  2010-03-11 17:37   ` Benjamin R. Haskell
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Klanderman @ 2010-03-11 16:27 UTC (permalink / raw)
  To: zsh-workers


Seems to work for me in 1.4869..

greg


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Broken completion on $prefix/*
  2010-03-11 16:27 ` Greg Klanderman
@ 2010-03-11 17:37   ` Benjamin R. Haskell
  2010-03-12  0:36     ` Greg Klanderman
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin R. Haskell @ 2010-03-11 17:37 UTC (permalink / raw)
  To: Zsh Workers

On Thu, 11 Mar 2010, Greg Klanderman wrote:

> Seems to work for me in 1.4869..
> 

Doesn't for me in 1.4926, even as 'zsh -fd':

hp% autoload -U compinit
hp% compinit
hp% prefix=relative/dir/that/exists
hp% ls $prefix/<Tab>
(completion for '/' directory)

hp% bindkey "^I"
"^I" expand-or-complete


And, a slightly-OT question:

Is there an easy way to build-and-install 'tagged' versions of Zsh from 
the repository?  I just built Zsh from git for the first time (installed 
into /usr/local) [usually I just use the Completion dirs from git].

But, it'd be nice to know it was properly 'sandboxed' (i.e. not reading 
my distribution's version's files [Gentoo - 4.3.10 (1.4705)]).  And it'd 
be even nicer to have it installed as (something like):
zsh-4.3.10.1.4926

-- 
Best,
Ben


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Broken completion on $prefix/*
  2010-03-11 17:37   ` Benjamin R. Haskell
@ 2010-03-12  0:36     ` Greg Klanderman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Klanderman @ 2010-03-12  0:36 UTC (permalink / raw)
  To: zsh-workers


>>>>> On March 11, 2010 Benjamin R Haskell <zsh@benizi.com> wrote:

> Doesn't for me in 1.4926, even as 'zsh -fd':

Duh.  Apparently I have 'compdef -d ls' in my init files..

greg


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-12  0:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-10 20:02 Broken completion on $prefix/* Benjamin R. Haskell
2010-03-11 16:27 ` Greg Klanderman
2010-03-11 17:37   ` Benjamin R. Haskell
2010-03-12  0:36     ` Greg Klanderman

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).