Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Announcement of Zsh Command Architect v1.0
- X-seq: zsh-users 21128
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: vogt@xxxxxxxxxxxxxxxxxx, zsh-users@xxxxxxx
- Subject: Re: Announcement of Zsh Command Architect v1.0
- Date: Fri, 8 Jan 2016 16:33:22 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=L7a3qlFVzonmAEjYqQly/QQ7rtiYUBPauyoQj2NLbxA=; b=ghoAqFoE7MzZQJ8WKkWl4Dg2xaR1LXYRLlcC4ydryinF1JieYhZmdT5bG+9oUqfQF8 88Lw5iqcvcOsKklXVl7H4pTcDG0ezbfeyCFPgzmdHZ/zgqUat1HlUm3lb/bK4iYlid7y 1vlmCcr9bujjj29Dvo2G/2GnRQ2SlEAbsLzbksVdigigz32fVt9UkJVzqGStMjw++gk2 vhWlXLymvti+8hRbs2foeOUplkZnGEmaJoXrqNI/IywI4uSdVdVJCcJxNT+hRbcw+0tP OsxU/8QyKiUb87YaPDDsqX03eMqJQvBk5erbNQ9HP6lp0fNC2SK+0mOtzes4Onjwcvhq uGlQ==
- In-reply-to: <20160108093313.GA16910@linux.vnet.ibm.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBZf9SQ+7En4nb6WCWv_WX226GtjWqDfTbwNcCKkvuBrg@mail.gmail.com> <20160108093313.GA16910@linux.vnet.ibm.com>
On 8 January 2016 at 10:33, Dominik Vogt <vogt@xxxxxxxxxxxxxxxxxx> 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 <TAB> a couple of times.
The main idea is navigation. It's possible to implement in Zsh thanks
to zsh/curses. I quite well feel what this is about but my explanation
is still rather imperfect.
Navigation: seeing much, narrowing what is seen, pressing cursors.
Typical approach: seeing little, invoking commands to resolve,
pressing keystrokes.
For example, Zsh can invoke things from history. I never learned how
to do this, but it has something to do with "!" command. AFAIK, one
can quickly run say 3rd last command from history and also use say 2nd
argument from last command. Forgive me my ignorance, but I never
crossed the border to use this functionality as I was repelled by the
following: seeing little, commanding much, pressing keystrokes.
Navigation is opposite. Seeing much, commanding little, pressing cursors.
ZNT allowed to see history, narrow what is seen with multi-keyword
searches, press cursors. ZCA allows to use any command segment from
all that, and arrange the selected segments. Seeing much, commanding
little, pressing cursors.
>> 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.
Yep, and all what's needed is awareness of patterns of following form:
*foo*~^*bar*
> 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
> <ctrl-a>#<return>
> # look for the history line with the long word; the multi word
> # search would be helpful
> <ctrl-r>The_Voi
> # Mark and cut the file name:
> <move cursor><ctrl-space><ctrl-f><ctrl-w>
> # abort editing
> <ctrl-g>
> # recall the unfinished command and insert the cut-buffer
> <cursor-up><ctrl-e> <ctrl-y>
> # remove comment and execute
> <ctrl-a><delete><return>
>
> 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<TAB><RETURN>".
>
> 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.
The yanking you presented is big player here. ZCA allows to quickly
insert segments from history, but with yanking learned by fingers one
can accomplish this in the way you presented. However, this is still:
seeing little, commanding much, pressing keystrokes, isn't it? The
normal command-wise approach.
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author