From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14233 invoked by alias); 8 Jan 2016 16:29:13 -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: 21129 Received: (qmail 21438 invoked from network); 8 Jan 2016 16:29:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=k3tllXItDxnY1/R3RK2LpJINIok+r+9lunU/GjwUacg=; b=qH/TQ5lgmLJDOe9/RC529u312111g+fROPHDSa9C3YWiL45OCymIvHpfGEWaJ9jH2M uuW/zDY8UzED71CpDd3GDOj0ttAACdd2vY+VVjnu0Xkgh2KWb80PJhACI4F0UU46mQ6Y 4pDpRqRkOzFtEIeXTZMEjo5JU18b/4SoMlz84O8q6aEHw0Kl3ar5RYlykgkPmAdgERl2 h6JWwXRgfOvnOSt8uEotUXxIaIiAXxKzBm9uXGTTQlNmHI1SuRQWj8S8Bqp5yZYDt520 WLT1zi535nhbPz2DdQGusM2CU+9ztHi2/usiWwyvHajtkD7VnshuxXsz8IaQhYgW0y1v 42Mg== MIME-Version: 1.0 X-Received: by 10.140.84.200 with SMTP id l66mr72948711qgd.90.1452270549519; Fri, 08 Jan 2016 08:29:09 -0800 (PST) In-Reply-To: <20160108093313.GA16910@linux.vnet.ibm.com> References: <20160108093313.GA16910@linux.vnet.ibm.com> Date: Fri, 8 Jan 2016 17:29:09 +0100 Message-ID: Subject: Re: Announcement of Zsh Command Architect v1.0 From: Mikael Magnusson To: vogt@linux.vnet.ibm.com, Zsh Users Content-Type: text/plain; charset=UTF-8 On Fri, Jan 8, 2016 at 10:33 AM, Dominik Vogt wrote: > On Wed, Jan 06, 2016 at 05:22:29PM +0100, Sebastian Gniazdowski wrote: >> Version 1.0 of the tool is ready, webpage with animated gifs: >> >> https://github.com/psprint/zsh-cmd-architect > > I've watched the video on that page many times and I'm still > trying to figure out what kind of problem this module can solve > that cannot be solved with history search, menu completion and > pressing a couple of times. > >> Feature highlights: >> - adding, removing, moving segments of commands > >> - colorful searching in history with multi-word matching > > The multi-word matching syntax would be helpful in general for all > "search"-type operations. > >> - unique mode - no need for HIST_IGNORE_ALL_DUPS >> - horizontal scroll - commands of any lengths can be handled and build >> - colorifying - configurable highlight of selected keywords >> >> (z) and zsh/curses are tools, ZCA is utility that uses them in a high >> level fashion. > >> No more need for a mouse to copy parts of commands in history. > > I never use the mouse for that (partially because the middle mouse > button is broken): > > (Move cursor to start of word to copy) > Ctrl-Space (set mark) > (Move cursor to start of word to copy) > Ctrl-w (cut) > (Move cursor to new location of the word) > Ctrl-y (yank; insert cut buffer) > > Or with the example from the video: > > # type > mplayer -fs > # noticed that I need a long word from the history, so comment > # out the unfinished command line and store it in the history > # > # look for the history line with the long word; the multi word > # search would be helpful > The_Voi > # Mark and cut the file name: > > # abort editing > > # recall the unfinished command and insert the cut-buffer > > # remove comment and execute > > > That's fifteen additional keystrokes plus typing part of the file > name and moving the cursor to the start of the name. And that's a > lot more typing than just "mplayer -fs The_Voi". > > To me it appears that cases where a complicated part of a former > history line needs to be copied and the same cannot easily be done > with completion is quite rare. And even then I could just edit > the complicated line instead of copying a part of it to a new > line. > > I'm really interested in user experience with that approach, > though. If you need a long word from history, another great widget to invoke is _history-complete-older, which is bound to alt-/ in emacs mode by compinit. This style makes it usually more usable, zstyle ':completion:*' range 50000:2000 narrow-to-region and push-input are also nice options, rather than mucking about with storing the current command somewhere else while looking around for your new word. -- Mikael Magnusson