From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 3LMnGZ+qWGFSFAAAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 20:53:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QGUjFJ+qWGFAYwAAbx9fmQ (envelope-from ) for ; Sat, 02 Oct 2021 18:53:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A876E3169E for ; Sat, 2 Oct 2021 20:53:18 +0200 (CEST) Received: from localhost ([::1]:42832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWk8L-0006oL-Q5 for larch@yhetil.org; Sat, 02 Oct 2021 14:53:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWk87-0006nY-R0 for guix-patches@gnu.org; Sat, 02 Oct 2021 14:53:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWk86-0004rB-Hm for guix-patches@gnu.org; Sat, 02 Oct 2021 14:53:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWk86-0007rL-7U for guix-patches@gnu.org; Sat, 02 Oct 2021 14:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50709] [PATCH] v2 gnu: Add zsh-syntax-highlighting. References: <87sfxy4zpa.fsf@posteo.org> In-Reply-To: <87sfxy4zpa.fsf@posteo.org> Resent-From: Alexandr Vityazev Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50709 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50709@debbugs.gnu.org Received: via spool by 50709-submit@debbugs.gnu.org id=B50709.163320073530039 (code B ref 50709); Sat, 02 Oct 2021 18:53:02 +0000 Received: (at 50709) by debbugs.gnu.org; 2 Oct 2021 18:52:15 +0000 Received: from localhost ([127.0.0.1]:60575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWk7F-0007oL-Ng for submit@debbugs.gnu.org; Sat, 02 Oct 2021 14:52:15 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWk7C-0007nn-Na for 50709@debbugs.gnu.org; Sat, 02 Oct 2021 14:52:08 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 16CB2240026 for <50709@debbugs.gnu.org>; Sat, 2 Oct 2021 20:51:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1633200720; bh=iGi6HrEU6kTr5EiXAWkyz8zNbrExUCbOVoiluTtRAuA=; h=From:To:Subject:Date:From; b=XNydfVpkXqR7gGpQLWgHmLCrVHTj9p+cGEcFYnCXqxc1izUZeDTpPMv6qKvOXCNO+ VYoku4w4f+TVa1nL3st30Mh93+Ccb+g9KkAtdcTDCnGyfKaynwbX/B9NQhkF55Cjkk 4DSF1Nk+oMNZIo7yJEJU7cnt8UL6i//41TqwvuOF0m6q5y+imFuFf2ammzP5FqtwwU EV57tzT6gJ7Yg5Dd9a/PfS/XUqlFgmnq2/vbBpb+ZbzhVeWcF09oovCsfv3DF+G8Gc jOHjVeOnsxweg+rTTFJUwG5Jhn8+cVRF+YHaO1inlZW9Z/N9Yc+997K4KjmqtYF0rp HFmGKmiO73e4w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HMGL66X6Fz6tm5 for <50709@debbugs.gnu.org>; Sat, 2 Oct 2021 20:51:58 +0200 (CEST) From: Alexandr Vityazev Date: Sat, 02 Oct 2021 18:52:00 +0000 Message-ID: <8735pj5kfj.fsf@posteo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633200798; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=CWZGahxuCdMdpruZ7uQIqOd1UvIiNJJT2t5PVnwNybQ=; b=eWaGOWRu5hU8vlcVpB0CVbo1LtDfuxo6lsWNOgVtF7SPqmM0auHfWHHtAZ8QeNvS3tVS5P GpSM4J86WdoeWhGkKYWHit/FM08RFe4ymP/cZFoQ0Tet2I9Uwqn6pt1k9bFFloJxxEOQsm EZPQ3jVLwE19XAJjx0/Of9PJRcEpXsJuR8myaXlsdpw54KdTkjukarFANwXi77wmd6iOXD q/+QLrabwbQSjn/ciGia78PBu3rQ1J4/bTAJd1JJk4WFDmGTPTV5FUuqKNABKSfnVBm8mw ydfu6ZtYFD0D+iu+zs7IvASVnfnzDRZmopOmFGxV4OUgrOo7bMNBZQD+Rch1Jw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633200798; a=rsa-sha256; cv=none; b=cn0UD1J8IBt5pRn1dGGWZ8aTHqjZjyXAYINELuKrR64OeXYTZ6c9tFqwckUGjAjMiVr18l PPHFrIStxfFm5sun2ldYG0FqqrUlE7NtuSuilZnhyGbr+h9Dyr5TO0HFku/p2n48+CPFaM I3yNy71jAnYj2ooRr3laz2dnoniGERU1UpI6UE82xYfZlc/vYm5HMoZBlha9Ppkt7106fv 1Fg6QgHNoBpYKMlMfy9NTO/r8Q6oF/l+zakAH2MwGJw9ZhoLeBfvOvpXnXSWPNbf5/ehdH 4qLAGkytHQ/MfxfeF1lgfn8L6oQVYg5FREoyjrwydAuN9d8QkH040B7/5YYBhw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.org header.s=2017 header.b=XNydfVpk; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.org header.s=2017 header.b=XNydfVpk; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: A876E3169E X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: kHlW3IdnP9cT * gnu/packages/shellutils.scm (zsh-syntax-highlighting): New variable. --- gnu/packages/shellutils.scm | 56 ++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 94b5536df7..8726020ab3 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -10,6 +10,8 @@ ;;; Copyright =C2=A9 2020 aecepoglu ;;; Copyright =C2=A9 2020 Dion Mendel ;;; Copyright =C2=A9 2021 Brice Waegeneire +;;; Copyright =C2=A9 2021 Alexandr Vityazev +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,7 +48,8 @@ #:use-module (gnu packages readline) #:use-module (gnu packages ruby) #:use-module (gnu packages shells) - #:use-module (gnu packages tmux)) + #:use-module (gnu packages tmux) + #:use-module (ice-9 regex)) =20 (define-public boxes (package @@ -138,6 +141,57 @@ text.") as you type.") (license license:expat))) =20 +(define-public zsh-syntax-highlighting + (package + (name "zsh-syntax-highlighting") + (version "0.7.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zsh-users/zsh-syntax-highligh= ting") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "039g3n59drk818ylcyvkciv8k9mf739cv6v4vis1h9fv9whbcmwl")))) + (build-system gnu-build-system) + (native-inputs + `(("zsh" ,zsh))) + (arguments + ;; FIXME: Tests fail when running test regexp + ;; there is no pcre module in the Guix zsh package + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch-paths + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" + (("/usr/local") out) + ((,(regexp-quote "share/$(NAME)")) "share/zsh/plugins/$(N= AME)"))))) + (add-after 'patch-paths 'make-writable + (lambda _ + (for-each make-file-writable + '("docs/highlighters.md" + "README.md")))) + (add-before 'build 'add-all-md + (lambda _ + (invoke "make" "all"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "test") + (invoke "make" "perf"))))))) + (home-page "https://github.com/zsh-users/zsh-syntax-highlighting") + (synopsis "Fish shell-like syntax highlighting for Zsh") + (description + "This package provides syntax highlighting for Zsh. It enables +highlighting of commands whilst they are typed at a Zsh prompt into an +interactive terminal. This helps in reviewing commands before running the= m, +particularly in catching syntax errors.") + (license license:bsd-3))) + (define-public sh-z (package (name "sh-z") --=20 2.33.0 --=20 Alexandr Vityazev