From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28170 invoked by alias); 2 Nov 2014 02:08:51 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19308 Received: (qmail 25537 invoked from network); 2 Nov 2014 02:08:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=wzGgXpLGoS5pLXDiiAJfqvB5zPBsvg8WSwz4pglAsnM=; b=ekFX2KcxYbWpZWlY2OCEP5YC3zdQ7VANYLiJAOOn0yoIgjiBPbZPFGloyBKebtml1o 2fWUiElone/JJ1sbwwQeysylzpwnB/Y8tgrMpMK69UYMUqyaXzaPIu24Nd8mdDLBY+mo c8KC7TMYFz/UPo58/zG+/o4alRlvC3bFqmLT+ciqte3QVZ7qwDB7Zq4bbMeLrWmv6LbZ Dcr3uHhCvXe4/jvY5CGo2r10nUR3iPmaJmJlcJ8JKkxetoYElqRMk+N7VsBpPWV8NmE+ 9SodkPnt7yQ5VmOlbeNdT05ENS1FoKYKexT4jOPQOtsUKhRr/4OUH1bPCRh3vOYeun34 FQ/Q== X-Gm-Message-State: ALoCoQlDi8wtasN97KVZJgCFbroulhN8Q+A7bqPaRhzgJCow5Zes5Hi372n9k53eFYpmum7ar8lm MIME-Version: 1.0 X-Received: by 10.140.49.107 with SMTP id p98mr48660613qga.20.1414894125938; Sat, 01 Nov 2014 19:08:45 -0700 (PDT) In-Reply-To: <54557CF5.8030000@gmail.com> References: <54557CF5.8030000@gmail.com> Date: Sat, 1 Nov 2014 19:08:45 -0700 Message-ID: Subject: Re: Sundry Completion Questions ($_ $(^^) $(!!:s//) From: Bart Schaefer To: Zsh Users Content-Type: multipart/alternative; boundary=001a1135234ec598150506d6b59d --001a1135234ec598150506d6b59d Content-Type: text/plain; charset=UTF-8 On Nov 1, 2014 5:39 PM, "Sonny Michaud" wrote: > > 1) I noticed that $_ does not expand. It expands for me. It doesn't expand to anything very useful, because its value changes during the execution of the completion functions, but it does expand. Do you have _expand in your "completer" zstyle? > 2) Quick history substitution does not expand in subcommands. Quick history substitution is a command-line construct, not a command syntax construct. It only works when the quick-history character appears as the first character of the input buffer. > 3) Since the above does not work, I usually use $(!!:s/foo/bar), which has bizarre behavior, depending on whether or not a trailing slash is provided. History syntax doesn't interact with shell command syntax in the way you are expecting. *Everything* after the second slash, *including* the closing paren, is part of the history reference unless you close the history syntax by adding the third slash. History substitution is a purely lexical replacement which occurs before any shell-syntax analysis of the input is performed. --001a1135234ec598150506d6b59d--