zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: Re: Completion and global aliases
Date: Wed, 9 Jun 1999 15:40:30 +0000	[thread overview]
Message-ID: <990609154030.ZM29919@candle.brasslantern.com> (raw)
In-Reply-To: <9906090749.AA32816@ibmth.df.unipi.it>

On Jun 9,  9:48am, Peter Stephenson wrote:
} Subject: Re: PATCH: Re: Completion and global aliases
}
} "Bart Schaefer" wrote:
} > The following patch implements `autoload -U ...' for this.  Hmm, I didn't
} > change `functions' to output anything for "unaliased" state; should it?
} 
} It's hard to know where to put it that isn't going to confuse matters,
} either because someone has code to search for `undefined', or because the
} next word is taken as the function name, etc.  Maybe as long as `functions
} -uU' works OK it's good enough.

Unfortunately, "functions -uU" can't do the "right" thing because functions
with the unaliased flag also have the undefined flag, and scanhashtable()
prints nodes that have any of the requested flags (not nodes that have all
of them).  Maybe the following is OK:

Index: Src/builtin.c
***************
*** 1846,1851 ****
--- 1846,1853 ----
       * are given, we will print only functions containing these  *
       * flags, else we'll print them all.                         */
      if (!*argv) {
+ 	if (ops['U'] && !ops['u'])
+ 	    on &= ~PM_UNDEFINED;
  	scanhashtable(shfunctab, 1, on|off, DISABLED, shfunctab->printnode, 0);
  	return 0;
      }

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


  reply	other threads:[~1999-06-09 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-09  2:43 Wayne Davison
1999-06-09  6:15 ` PATCH: " Bart Schaefer
1999-06-09  7:48   ` Peter Stephenson
1999-06-09 15:40     ` Bart Schaefer [this message]
1999-06-09  8:53 Sven Wischnowsky
1999-06-09  9:17 ` Andrej Borsenkow
1999-06-09  9:01   ` Peter Stephenson
1999-06-09 16:49     ` Bart Schaefer
1999-06-09 17:05       ` Andrej Borsenkow

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=990609154030.ZM29919@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.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).