zsh-users
 help / color / mirror / code / Atom feed
* Problem with Named Dirs & GNU Screen
@ 2004-06-05 19:30 Aaron Davies
  2004-06-05 19:39 ` Dan Nelson
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Davies @ 2004-06-05 19:30 UTC (permalink / raw)
  To: zsh-users

I've been trying to figure out the named dirs issue I wrote about 
several weeks ago, but I'm still having problems. The situation is 
this: I would like to create a named dir "palmfiles" expanding to 
"~/Documents/Palm/Users/Aaron Davies/Files to Install". To this end, I 
have in my .zprofile the following line:

export palmfiles=~/Documents/Palm/Users/Aaron\ Davies/Files\ to\ Install

and in my .zshrc:

setopt AUTO_NAME_DIRS

My goal, incidentally, is to have ~palmfiles expandable immediately 
upon shell startup (ie, typing "~palm<TAB>" should work, not beep). In 
this I am successful, as long as I'm in zsh directly. However, I prefer 
to run all my consoles within GNU screen, and there it breaks down. 
~palmfiles is still a valid named dir, but it will not expand until 
it's been used once. I've tried the following: putting the setopt in my 
zprofile, putting ": palmfiles" in my zprofile, putting ": palmfiles" 
in my zshrc. None of them worked.

Does anyone have any other ideas?
-- 
     __                        __
    /  )                      /  )
   /--/ __.  __  ________    /  / __. , __o  _  _
  /  (_(_/|_/ (_(_) / / <_  /__/_(_/|_\/ <__</_/_)_


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

* Re: Problem with Named Dirs & GNU Screen
  2004-06-05 19:30 Problem with Named Dirs & GNU Screen Aaron Davies
@ 2004-06-05 19:39 ` Dan Nelson
  2004-06-05 19:42   ` Aaron Davies
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Nelson @ 2004-06-05 19:39 UTC (permalink / raw)
  To: Aaron Davies; +Cc: zsh-users

In the last episode (Jun 05), Aaron Davies said:
> I've been trying to figure out the named dirs issue I wrote about 
> several weeks ago, but I'm still having problems. The situation is 
> this: I would like to create a named dir "palmfiles" expanding to 
> "~/Documents/Palm/Users/Aaron Davies/Files to Install". To this end, I 
> have in my .zprofile the following line:
> 
> export palmfiles=~/Documents/Palm/Users/Aaron\ Davies/Files\ to\ Install
> 
> and in my .zshrc:
> 
> setopt AUTO_NAME_DIRS

Try putting that setopt in .zprofile, _above_ your variable definition,
or move the variable definition into .zshrc.  The execution order of
startup scripts is:

.zshenv .zprofile .zshrc .zlogin

So AUTO_NAME_DIRS isn't yet set when the variable is first set.  You
could also run

hash -d palmfiles=~/Documents/Palm/Users/Aaron\ Davies/Files\ to\ Install

which will create a named directory without the matching shell variable
(if that's what you want).

-- 
	Dan Nelson
	dnelson@allantgroup.com


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

* Re: Problem with Named Dirs & GNU Screen
  2004-06-05 19:39 ` Dan Nelson
@ 2004-06-05 19:42   ` Aaron Davies
  2004-06-05 21:35     ` Aaron Davies
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Davies @ 2004-06-05 19:42 UTC (permalink / raw)
  To: zsh-users

On Saturday, June 5, 2004, at 03:39 PM, Dan Nelson wrote:

> In the last episode (Jun 05), Aaron Davies said:
>> I've been trying to figure out the named dirs issue I wrote about
>> several weeks ago, but I'm still having problems. The situation is
>> this: I would like to create a named dir "palmfiles" expanding to
>> "~/Documents/Palm/Users/Aaron Davies/Files to Install". To this end, I
>> have in my .zprofile the following line:
>>
>> export palmfiles=~/Documents/Palm/Users/Aaron\ Davies/Files\ to\ 
>> Install
>>
>> and in my .zshrc:
>>
>> setopt AUTO_NAME_DIRS
>
> Try putting that setopt in .zprofile, _above_ your variable definition,
> or move the variable definition into .zshrc.  The execution order of
> startup scripts is:
>
> .zshenv .zprofile .zshrc .zlogin

I moved the variable definition into zshrc, which did it. I could have 
sworn I'd tried that before . . . . Thanks!
-- 
     __                        __
    /  )                      /  )
   /--/ __.  __  ________    /  / __. , __o  _  _
  /  (_(_/|_/ (_(_) / / <_  /__/_(_/|_\/ <__</_/_)_


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

* Re: Problem with Named Dirs & GNU Screen
  2004-06-05 19:42   ` Aaron Davies
@ 2004-06-05 21:35     ` Aaron Davies
  2004-06-06  3:41       ` Dan Nelson
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Davies @ 2004-06-05 21:35 UTC (permalink / raw)
  To: zsh-users

On Jun 5, 2004, at 3:42 PM, Aaron Davies wrote:

> On Saturday, June 5, 2004, at 03:39 PM, Dan Nelson wrote:
>
>> In the last episode (Jun 05), Aaron Davies said:
>>
>>> I've been trying to figure out the named dirs issue I wrote about
>>> several weeks ago, but I'm still having problems. The situation is
>>> this: I would like to create a named dir "palmfiles" expanding to
>>> "~/Documents/Palm/Users/Aaron Davies/Files to Install". To this end, 
>>> I
>>> have in my .zprofile the following line:
>>>
>>> export palmfiles=~/Documents/Palm/Users/Aaron\ Davies/Files\ to\ 
>>> Install
>>>
>>> and in my .zshrc:
>>>
>>> setopt AUTO_NAME_DIRS
>>
>> Try putting that setopt in .zprofile, _above_ your variable 
>> definition,
>> or move the variable definition into .zshrc.  The execution order of
>> startup scripts is:
>>
>> .zshenv .zprofile .zshrc .zlogin
>
> I moved the variable definition into zshrc, which did it. I could have 
> sworn I'd tried that before . . . . Thanks!

BTW, I also tried putting them both in zprofile, which didn't work from 
within screen. It looks like it's not called again when zsh is started 
by screen--I guess it must be started as a non-login shell?
-- 
Aaron Davies
agdavi01@louisville.edu


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

* Re: Problem with Named Dirs & GNU Screen
  2004-06-05 21:35     ` Aaron Davies
@ 2004-06-06  3:41       ` Dan Nelson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Nelson @ 2004-06-06  3:41 UTC (permalink / raw)
  To: Aaron Davies; +Cc: zsh-users

In the last episode (Jun 05), Aaron Davies said:
> On Jun 5, 2004, at 3:42 PM, Aaron Davies wrote:
> >On Saturday, June 5, 2004, at 03:39 PM, Dan Nelson wrote:
> >>
> >>Try putting that setopt in .zprofile, _above_ your variable
> >>definition, or move the variable definition into .zshrc.  The
> >>execution order of startup scripts is:
> >>
> >>.zshenv .zprofile .zshrc .zlogin
> >
> >I moved the variable definition into zshrc, which did it. I could
> >have sworn I'd tried that before . . . . Thanks!
> 
> BTW, I also tried putting them both in zprofile, which didn't work
> from within screen. It looks like it's not called again when zsh is
> started by screen--I guess it must be started as a non-login shell?

Oops; right, I shouldn't have suggested that.

-- 
	Dan Nelson
	dnelson@allantgroup.com


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

end of thread, other threads:[~2004-06-06  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-05 19:30 Problem with Named Dirs & GNU Screen Aaron Davies
2004-06-05 19:39 ` Dan Nelson
2004-06-05 19:42   ` Aaron Davies
2004-06-05 21:35     ` Aaron Davies
2004-06-06  3:41       ` Dan Nelson

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).