Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: backticks

On Sep 25,  7:38pm, Gossamer wrote:
} Subject: backticks
} In my .zshrc I have this
}    inboxen=(`/bin/ls ~/Mail/IN/`)
}    compctl -k inboxen m
}    mailboxen=(`/bin/ls ~/Mail/`)
}    compctl -k mailboxen mb
} They work great EXCEPT in the case where a new mailbox or inbox is
} created after I log in (and hence after the backtick bits are
} evaluated).

Better would be:

    compctl -g '~/Mail/IN/*(:t)' m
    compctl -g '~/Mail/*(:t)' mb

Or in 3.1.4:

    compctl -fW '~/Mail/IN/' m
    compctl -fW '~/Mail/' mb

You should almost never use "ls" when a glob pattern will do.

} Is there any way to delay evaluation?

There's "compctl -s ..." but the man page says "-g is faster for file

} Or is it best to just re-read that file in the (admittedly fairly
} rare, say once a week?) case there's a new box?


} What'd be the simplest alias to read back in all the /etc/zsh* ~/.zsh*
} files?

    exec zsh -l

Seriously, you really don't want to reread the entire startup file set
just for something like this.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Messages sorted by: Reverse Date, Date, Thread, Author