zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: completion fails if dir referenced via variable.
Date: Wed, 26 Feb 2014 21:06:50 -0800	[thread overview]
Message-ID: <530EC7EA.8020602@eastlink.ca> (raw)
In-Reply-To: <140226182921.ZM3650@torch.brasslantern.com>

On 02/26/2014 06:29 PM, Bart Schaefer wrote:


Thanks Bart, I'm not sophisticated enough yet for this sort of thing. 
Where do I put this function? I'll certainly play with it, but I've not 
yet looked into the guts of any of this stuff. All those 'zstyle' things 
are a mystery. Is there some recommended doc? It's time I knew what 
those dozen or so 'zstyle' lines did.

As to:

} BTW another strange thing: if I start a fresh shell, I can't expand a
} variable unless I 'echo' it first. The variable is certainly set, and it
} echos to screen, but without echoing it, it will not expand nohow. Any
} reason of that?

I'm guessing this is going to depend on which variable you're trying.
Some variables are autoloaded from modules and appear when you reference
them with $varname, but wouldn't be around yet to be completed when you
first attempt it.

The variable is $t[?] where '?' is the number of each open terminal, and 
which holds the current directory for each open terminal. It's updated 
automatically within 'chpwd()'.  So 'cp $t1/filename .' copies  
'filename' from whatever is the current directory on terminal #1 to the 
current directory on whatever terminal the command is executed from. It 
works fine except that it won't expand on the command line in a brand 
new shell. Note this is not much of an issue since there's no problem 
with the actual copy, only with expanding it visually with TAB, and that 
only becomes an issue if I'm wanting to complete a filename in the same 
command in which a variable also exists, so it's the most minimal of 
bugs. Still it seems to me that it should expand. Actually, any command 
at all prior to the command in which  I attempt this sort of expansion 
solves the problem so it's only happens with an absolutely virgin shell. 
Not worth any trouble.


  reply	other threads:[~2014-02-27  5:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04  4:09 How to make a function use inbuilt completions of another command? Keerthan jai.c
2014-02-04 15:39 ` Bart Schaefer
2014-02-04 16:10   ` Frank Terbeck
2014-02-04 18:08     ` Bart Schaefer
2014-07-21  0:52       ` Keerthan jai.c
2014-02-04 16:25   ` Access command that called a function within the function Ray Andrews
2014-02-05  3:46     ` Bart Schaefer
2014-02-05 18:33       ` Ray Andrews
2014-02-05 20:21         ` Bart Schaefer
2014-02-05 22:54           ` Ray Andrews
2014-02-22 18:35           ` key bindings table? Ray Andrews
2014-02-23 23:40             ` Bart Schaefer
2014-02-24  3:31               ` Ray Andrews
2014-02-25 15:21           ` completion fails if dir referenced via variable Ray Andrews
2014-02-25 17:46             ` Bart Schaefer
2014-02-25 18:25               ` Ray Andrews
2014-02-25 19:21                 ` Bart Schaefer
2014-02-25 19:41                   ` Ray Andrews
2014-02-27  2:29                     ` Bart Schaefer
2014-02-27  5:06                       ` Ray Andrews [this message]
2014-02-27  5:34                         ` key codes table Ray Andrews
2014-03-01  5:08                           ` Bart Schaefer
2014-03-01 20:44                             ` Ray Andrews
2014-03-01 22:50                               ` shawn wilson
2014-03-02 17:27                                 ` Bart Schaefer
2014-03-02 18:18                                   ` shawn wilson
2014-03-03  1:52                                     ` Ray Andrews
2014-02-25 20:02                   ` completion fails if dir referenced via variable Oliver Kiddle
2014-02-25 21:57                     ` Ray Andrews
2014-02-27  2:32                       ` Bart Schaefer
2014-02-05 22:45       ` Access command that called a function within the function Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=530EC7EA.8020602@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).