Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion files sensitive to user options like RC_QUOTES
- X-seq: zsh-workers 40108
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: completion files sensitive to user options like RC_QUOTES
- Date: Tue, 6 Dec 2016 13:21:36 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=c8TD0EXj51et5dAD2bgp5nV4EwoKbyu+1V9/Atd9n7s=; b=RcJy/rXbiCQcU90RepHEi7dgUMmMTNMr9p0k9lnilwg1reuesBMlDdGT44M3pBetTv jsiRtqQoV9xWqXJfkK3oJvMLJ5Igzns/ARmFp5H5FqA7HSXceH5de/Srh8R1Uibf40Gh XP197UIvJRXE3gU4kHVxp9htzBKQJ4vD2Uff0h20hgLQkWchO5kcLOEKKvMZosLLe+vz 76//64muwwDudSUqQR+wRLcd9PMBggIzEgBjuoH2UOJ95/+w8Da1+moiSMBUMLitG8tr Tny367qbZGigeUWRJkMz0BocpMs/wYx7lfwpdWMFhFOH1eN4ALT2msPvGmvXLf3bkPpC Nccg==
- In-reply-to: <67542.1481045399@hydra.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20161206142754.GA12824@cventin.lip.ens-lyon.fr> <161206085722.ZM31320@torch.brasslantern.com> <67542.1481045399@hydra.kiddle.eu>
On Dec 6, 6:29pm, Oliver Kiddle wrote:
} Subject: Re: completion files sensitive to user options like RC_QUOTES
}
} Bart wrote:
} > The intention is that completion files will be auto-loaded from the
} > completion system after _main_complete has started, where they will be
} > affected by the set of options that it controls.
}
} _comp_options+=( NO_rcquotes )
} foo '<tab> -> 'don'\''t'
OK, that's a reasonable counter-argument to my patch.
} In the early days, _comp_options was intentionally kept minimal.
} It contains a lot more than it used to so I worry that we've already
} broken things in some areas.
There would be a case for wrapping the "eval" expressions in _expand
with temporary restoration of $_comp_caller_options, because of the
effects of NO_ksharrays etc. There might be a few other similar
situations.
} The quoting is internal to the C code so shouldn't look at
} _comp_caller_options. We'd need to add some sort of hook
We have the "sticky emulation" mechanism. Entry to completion could
save the current option state before invoking the user-defined code,
and then compadd could temporarily revert to that saved state. We
could also add another builtin (compopts?) to manage it explicitly,
though the state would still need initial capture.
On a side note, maybe we need a special keyword for "emulate" that
means "make sticky whatever the current options are" -- right now
you would have to spell that out explicitly, relative to some base
emulation such as zsh or sh.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author