Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: The "-g" option in compctl doesn't insert correctly
- X-seq: zsh-users 9757
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: The "-g" option in compctl doesn't insert correctly
- Date: Mon, 05 Dec 2005 05:00:16 +0000
- In-reply-to: <20051204093535.GA598@DervishD>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20051204093535.GA598@DervishD>
On Dec 4, 10:35am, DervishD wrote:
}
} $ compctl -g '/example/dir/*(.x:t)' example
}
} Now, if I press <ENTER> the completion is accepted but the cursor
} doesn't move on to allow for more completions. If I remove the ":t"
} modifier, then all works ok.
The -g option tells compctl that what's being completed are file names,
which in the absence of any other options are expected to be relative
to either the current directory or to the path prefix on the command
line; but what you're generating are the tails of file paths, relative
to some fixed directory.
Compctl is going to try to find a file (or directory) matching the
name you generated, so that it can append either a space (for a file)
or a slash (for a directory); but it's not going to find anything that
matches (unless your current directory is /example/dir) because you've
lopped off the path. So it appends nothing.
What you really want is
compctl -W /example/dir -g '*(.x)' example
Messages sorted by:
Reverse Date,
Date,
Thread,
Author