From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14173 invoked from network); 17 Oct 2022 09:26:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Oct 2022 09:26:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1665998797; b=sga+mVVWlnbpP7MIDSQW7W82QLrT5JZyPm9ME5TMH1k8X/ZxusKIBrOuZkVbqHMWevEeEBpQCR xw+9dZWqWc54PWr5zbI0zChp3bUQ9WGupsF6M0TSQmEsDwrWGL23Lq8INE5KJIP3qDbcQ3SiuG Nn6hlnvqNUIJad8Ub5SpA0csSTM7PftpBZ9r8zzMsISuE9HbK7wNX3vunm1bdNOX4LQ9dLGAjM +qxnVycJd6+9XvDXj+X7KiyCEEAZ+olkAfwz1aL0+JE93UxBy/lnd7JSwwvMKHGg6pP1QNltA7 W4GQPJqIN0v7sOh28oVLYcvmH7Gkt/dAgrBbLi5LMH4qrw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pg1-f174.google.com) smtp.remote-ip=209.85.215.174; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1665998797; bh=cOdxqinUtz9k2NgJnY3u5jnDOZxXnMIICBjWUGD8mDQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=a2d30vZqsKgeD0LIhNPmMR/b/SMwfmWJinkt+NZwMSVH+LJRWRlZIZ9YeC9UriEMaUyULFUqDh rk31Od99nxWQrsLGWYGYMVWMxEdSV1+02O/K6qgVBfN75LVI+ivc1y/89zCPQ8T6+eWPXQP7gW Z5atYJULSSA+VfP/bJNE19O4IMWMWEf1K7JsKmGE9lRokIEyTFfMhh9YCY+CDTj5v2WdB02qbu OK9sxtwZB72/4xMDFyxEvNNYDQN22iw2SZV/CeBXXVUzQmnDyXl6CXA+wNoD2MXuEufFI7giUu 0B7h3akgWf8XVdC+xvwF+YQsDliyqGWr4x1wKfmh0dlBkw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=XajW2eZMy+AoQLI9u33HJmZqbrb1UYWSzQ3QsPJNRQM=; b=lZ+qqEQoEN14C98eRCkUURLgu6 fFW+FuP+k+KCG1kCbJW0J/Vcs/mDKSH+CJwer/+SIuU3AzNuWp568kzNNeVm/OFI3pD31J4YwoF45 8dg7VuIGuN1newQzAR3xBe9Z0YSbs4OI/xZf8tmvuY+yVlux6sB6c7X9eSwiRzDRmN5v2qoDrJz6x R95dpYf/YQjTQX/Dcr+azV0QYRY5faLYtC7pye59ewRm2hinzdWuhGGh+grrQDJgmzLB+2Y6nbMWY FycGlJfNc+1W8hEVZvOqwsX8vTRSJclKwUuC9y7zPdajZQ8z4iywyn9ITgt17c71DidVn9LazN98Z 2d+BhImw==; Received: by zero.zsh.org with local id 1okMOK-0000H6-Sy; Mon, 17 Oct 2022 09:26:36 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pg1-f174.google.com) smtp.remote-ip=209.85.215.174; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pg1-f174.google.com ([209.85.215.174]:41909) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1okMNF-000PJn-Du; Mon, 17 Oct 2022 09:25:30 +0000 Received: by mail-pg1-f174.google.com with SMTP id q9so9924635pgq.8 for ; Mon, 17 Oct 2022 02:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XajW2eZMy+AoQLI9u33HJmZqbrb1UYWSzQ3QsPJNRQM=; b=pmq+NQD2FI/PEq3E5rOnhBZOjCmBM+LBJ+23R6rdHtwdjIAQhR/iJtvQ4IW/SWXv0O KAWhhBnMSRROcxG08usVAFE12JzU8LrVp5tLuz9QsIZN624HG7NruPY4Vd/0JrJ6Nbwn qc57kt9w+28Wo7ZwDrFrokYRnSXeq3Bpc9L6ynrta1rZzlXKLdssO96ZwgBGefkKLqhU vidM6DxGm9P64IJ09xGrdnKSNJ0lLnMnXGWzKyp9RRVIKPPpaKeZD9H7LHdL53k6WaR0 NSKke40mfhbqiS2EMl819J5VmWRxf6TtHkW0z7M/BoiHeXxtagKKSFxT5DscYJPkvtnA cQtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XajW2eZMy+AoQLI9u33HJmZqbrb1UYWSzQ3QsPJNRQM=; b=L7qycVXMoBYJFGHG+q0uihdtsoj4lLG6csIfLQlqd4dob6jCvCWnV/hrAC1kYvjXQT QTaxtDyHGRA2a/MwW5B5f+wMeViu5mbOl0leERYvNQfSTWhq30XSwdAK7qQMDIeb1swL diENLMeWof/JAOxKvCyll8K2mPlExOkWsQA813WttHjh03RCScw1OY9k5vjZ8LXBNTza kWKE0x/3hD8ObsLMpjFNXnNnXW7HLzfOw8rDx9PBTAHCq63nS0HT8HspPtir1wyGcivy psBHfN/nB0T+qup1O9RgUjnk1Hz0KD+uj2Xax+yMusq8Mepn2TC5OuoR9f3eq7fmhQK3 VQSg== X-Gm-Message-State: ACrzQf1WRfi3FKndSXTeNkwk4mBSAKmWH0w/kQIMLyqLZNP19IxP4/tu 5JzVeXPPdAhr9V+5HlXZJ27eR0LsbOCfmfY+HUk= X-Google-Smtp-Source: AMsMyM5jyhxljG9ZnRj//EdmTCccsZda4qRQdhZhx576MTiPiQReWuqJwGyI8RhjyP5KsZbG1CIWH1p4sLqrL0nPCtk= X-Received: by 2002:a65:6955:0:b0:439:a99b:bca5 with SMTP id w21-20020a656955000000b00439a99bbca5mr9933500pgq.80.1665998727952; Mon, 17 Oct 2022 02:25:27 -0700 (PDT) MIME-Version: 1.0 References: <9184bbff-9e68-7b02-2595-3474b016dfff@eastlink.ca> <4e4d53a2-226e-a0ae-a1f7-87619eaff155@eastlink.ca> <782c7588-4b07-a651-ef83-2d36a7d1d568@eastlink.ca> In-Reply-To: From: Pier Paolo Grassi Date: Mon, 17 Oct 2022 11:24:50 +0200 Message-ID: Subject: Re: line continuation with sed To: Bart Schaefer Cc: Ray Andrews , zsh-users@zsh.org Content-Type: multipart/alternative; boundary="00000000000060445b05eb378e1e" X-Seq: 28220 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --00000000000060445b05eb378e1e Content-Type: text/plain; charset="UTF-8" I answered myself with autoload -U add-zle-hook-widget Pier Paolo Grassi Il giorno lun 17 ott 2022 alle ore 11:19 Pier Paolo Grassi < pierpaolog@gmail.com> ha scritto: > add-zle-hook-widget > zsh: command not found: add-zle-hook-widget > > locate add-zle-hook-widget > /usr/local/share/zsh/5.8/functions/_add-zle-hook-widget > /usr/local/share/zsh/5.8/functions/_add-zle-hook-widget.zwc > /usr/local/share/zsh/5.8/functions/add-zle-hook-widget > /usr/local/share/zsh/5.8/functions/add-zle-hook-widget.zwc > > echo $fpath > /root/scripts//zsh/functions/zle/ /usr/local/share/zsh/5.8/functions/ > > why the command is not found? Should I do something to load the functions > from fpath? > thanks > > Pier Paolo Grassi > > > Il giorno lun 17 ott 2022 alle ore 06:22 Bart Schaefer < > schaefer@brasslantern.com> ha scritto: > >> On Sun, Oct 16, 2022 at 8:40 PM Ray Andrews >> wrote: >> > >> > On 2022-10-16 18:07, Bart Schaefer wrote: >> > > You might find something like this interesting: >> > That is really elegant. >> >> Actually that implementation is kind of ugly. I completely forgot >> about this much prettier way: >> >> show-trailing-space() { >> if [[ $BUFFER = *(' '|$' \n'*) >> || $PREBUFFER = *$' \n'* ]] >> then POSTDISPLAY=$'\u21a9' >> else unset POSTDISPLAY >> fi >> } >> zle -N show-trailing-space >> add-zle-hook-widget line-pre-redraw show-trailing-space >> add-zle-hook-widget history-line-set show-trailing-space >> >> --00000000000060445b05eb378e1e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I answered myself with

autoload -U add-= zle-hook-widget

Pier Paolo Grassi


<= div dir=3D"ltr" class=3D"gmail_attr">Il giorno lun 17 ott 2022 alle ore 11:= 19 Pier Paolo Grassi <pierpaolog= @gmail.com> ha scritto:
add-zle-hook-widget =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
zsh: command not found: add-zle-hook= -widget

locate add-zle-hook-widget
/usr/loc= al/share/zsh/5.8/functions/_add-zle-hook-widget
/usr/local/share/zsh/5.8= /functions/_add-zle-hook-widget.zwc
/usr/local/share/zsh/5.8/functions/a= dd-zle-hook-widget
/usr/local/share/zsh/5.8/functions/add-zle-hook-widge= t.zwc

echo $fpath
/root/scripts//zsh/functi= ons/zle/=C2=A0 /usr/local/share/zsh/5.8/functions/

why the command = is not found? Should I do something to load the functions from fpath?
=
thanks

Pier Paolo Grassi


Il giorno lun 17 ott= 2022 alle ore 06:22 Bart Schaefer <schaefer@brasslantern.com> ha scritto:
On Sun, Oct 16, 20= 22 at 8:40 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2022-10-16 18:07, Bart Schaefer wrote:
> > You might find something like this interesting:
> That is really elegant.

Actually that implementation is kind of ugly.=C2=A0 I completely forgot
about this much prettier way:

show-trailing-space() {
=C2=A0 if [[ $BUFFER =3D *(' '|$' \n'*)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 || $PREBUFFER =3D *$' \n'* ]]
=C2=A0 then POSTDISPLAY=3D$'\u21a9'
=C2=A0 else unset POSTDISPLAY
=C2=A0 fi
}
zle -N show-trailing-space
add-zle-hook-widget line-pre-redraw show-trailing-space
add-zle-hook-widget history-line-set show-trailing-space

--00000000000060445b05eb378e1e--