zsh-workers
 help / color / mirror / code / Atom feed
From: "Oliver Kiddle" <okiddle@yahoo.co.uk>
To: Bart Schaefer <schaefer@brasslantern.com>, zsh-workers@sunsite.dk
Subject: Re: Completion for pine is broken
Date: Thu, 21 Feb 2002 12:54:35 +0000 (GMT)	[thread overview]
Message-ID: <20020221125435.59439.qmail@web9303.mail.yahoo.com> (raw)
In-Reply-To: <1020216184449.ZM25378@candle.brasslantern.com>

[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]

 --- Bart Schaefer <schaefer@brasslantern.com> wrote:
> This dates from long, long ago, possibly from the introduction of
> _pine.
> (As you can guess, I hardly ever start pine from the shell; it's
> always
> running in its own xterm and I just open new folders from the pine
> menus).

I wouldn't have guessed you'd be running pine at all instead of Z-mail.

> There's this snippet in _pine:
> 
> if [[ -n $+_cache_pine_options ]]; then
>   for optfile in ~/.pinerc /etc/pine.conf; do
>     if [[ -f $optfile ]]; then
>       getopts="cat $optfile"
>       break
>     fi
>   done
>   _cache_pine_options=( $($=getopts | sed -n 's/^\([^#]*=\).*/-\1/p')
> )
> fi
> 
> 
> And then there's my .pinerc, which has this fragment:
> 
> folder-collections=Mail mail/[],
>         "Archives on zanshin.com" {zanshin.com}/archive/[%],
>         Home [],
>         "Home on zanshin.com" {zanshin.com/debug}/home/schaefer/[]
> 
> 
> The double quotes in those folder-collection names wreak havok.  In
> general,
> any word in a .pinerc can be a quoted string.  I really don't follow
> what
> that code in _pine is supposed to be doing, but whatever it is is
> broken.

Every configuration item in pine can be used on the command line like a
normal option. That code was there to try to pick up a .pinerc file to
get a list of all the configuration options. What I can't remember is
why I got it to try .pinerc files before running pine -conf. It might
have been because it was faster or it might have been because running
pine -conf omits some options. Whatever it was, I doubt it was
particularly critical. I don't use pine so only ever tested it with a
default pine configuration. Can you try the attached (to avoid
word-wrap) patch and let me know if it works. It just uses pine -conf
which I hope doesn't risk problems with quoted values messing up the
sed expression.

As an aside, _pine could perhaps use two calls to _arguments so that
you can select between the two sets of options with a tag-order.

Oliver

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

[-- Attachment #2: pine.txt --]
[-- Type: text/plain, Size: 745 bytes --]

--- Completion/Unix/Command/_pine	Thu Jan 17 10:24:39 2002
+++ Completion/Unix/Command/_pine	Thu Feb 21 12:26:30 2002
@@ -1,16 +1,10 @@
 #compdef pine pinef
 
 local curcontext="$curcontext" state line expl suf
-local optfile getopts='pine -conf' sortorder lusortorder opts send idx
+local sortorder lusortorder opts send idx
 
 if [[ -n $+_cache_pine_options ]]; then
-  for optfile in ~/.pinerc /etc/pine.conf; do
-    if [[ -f $optfile ]]; then
-      getopts="cat $optfile"
-      break
-    fi
-  done
-  _cache_pine_options=( $($=getopts | sed -n 's/^\([^#]*=\).*/-\1/p') )
+  _cache_pine_options=( $(_call_program pine-options pine -conf| sed -n 's/^\([^#]*=\).*/-\1/p') )
 fi
 
 sortorder=( {subject,arrival,date,from,size}{,/reverse} )

  reply	other threads:[~2002-02-21 12:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-16 18:44 Bart Schaefer
2002-02-21 12:54 ` Oliver Kiddle [this message]
2002-02-21 15:22   ` Bart Schaefer
2002-02-21 15:37   ` Menu-selection screen refresh slowness Bart Schaefer
2002-02-21 15:51     ` Sven Wischnowsky
2002-02-21 16:19       ` Bart Schaefer
2002-02-21 16:33         ` Sven Wischnowsky
2002-05-24  8:48     ` Sven Wischnowsky
2002-05-24 14:31       ` Borsenkow Andrej
2002-05-24 15:01         ` Sven Wischnowsky
2002-05-27  7:39           ` Sven Wischnowsky
2002-05-24 15:37       ` Bart Schaefer
2002-05-30  8:26         ` Sven Wischnowsky

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=20020221125435.59439.qmail@web9303.mail.yahoo.com \
    --to=okiddle@yahoo.co.uk \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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).