From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27899 invoked by alias); 3 Nov 2017 12:09:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 41980 Received: (qmail 17034 invoked by uid 1010); 3 Nov 2017 12:09:39 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(-1.1/5.0):. Processed in 1.082537 secs); 03 Nov 2017 12:09:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Yuri D'Elia Subject: Changing subword-range according to current completion context Date: Fri, 03 Nov 2017 12:52:10 +0100 Message-ID: <87h8ubo9zp.fsf@wavexx.thregr.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cancel-Lock: sha1:hbQ08xiWG2qyYJ2DkaS+DyHspeM= I'd like to fine-tune the way words are interpreted according to the completion context which was used to expand the word, not to the zle context. Is it saved anywhere? Is it possible to correlate the two? For example, I normally had the following: select-word-style S zstyle ':zle:*' word-context '*/*' path '-*' arg zstyle ':zle:*:path' subword-range '/' zstyle ':zle:*:arg' subword-range '=' This allows me to navigate paths easily as well as well as change assignments in typical long-style arguments. But I'm bothered that the context is derived according to a glob match I explicitly defined, and not by the completion function. Seems like I'm defining the context of each word twice, once for the completer and once again for zle.