From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QE6mJScVSWEFOAAAgWs5BA (envelope-from ) for ; Tue, 21 Sep 2021 01:11:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ONdbIScVSWFMIAAA1q6Kng (envelope-from ) for ; Mon, 20 Sep 2021 23:11:35 +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 C8F0411AF4 for ; Tue, 21 Sep 2021 01:11:34 +0200 (CEST) Received: from localhost ([::1]:41502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSSRg-0006jU-GF for larch@yhetil.org; Mon, 20 Sep 2021 19:11:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSSKQ-0008Q2-Qo for guix-patches@gnu.org; Mon, 20 Sep 2021 19:04:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSSKQ-0005vS-Jh for guix-patches@gnu.org; Mon, 20 Sep 2021 19:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSSKQ-0001wS-Dn for guix-patches@gnu.org; Mon, 20 Sep 2021 19:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50709] [PATCH] gnu: Add zsh-syntax-highlighting. Resent-From: Alexandr Vityazev Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Sep 2021 23:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50709 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50709@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16321790057396 (code B ref -1); Mon, 20 Sep 2021 23:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Sep 2021 23:03:25 +0000 Received: from localhost ([127.0.0.1]:44260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSSJp-0001vE-Ck for submit@debbugs.gnu.org; Mon, 20 Sep 2021 19:03:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:50152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSSJo-0001v7-BR for submit@debbugs.gnu.org; Mon, 20 Sep 2021 19:03:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSSJm-0007ng-OX for guix-patches@gnu.org; Mon, 20 Sep 2021 19:03:24 -0400 Received: from mout02.posteo.de ([185.67.36.66]:40785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSSJk-0005MX-8U for guix-patches@gnu.org; Mon, 20 Sep 2021 19:03:22 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B6885240101 for ; Tue, 21 Sep 2021 01:03:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1632178995; bh=AD2g80CuwahhhTiHPc2Z0t0EjLNTj3TZ5/RGLbtXwC0=; h=From:To:Subject:Date:From; b=JGd3+AyW0RMb8dMo8ZGtNwEHAsBn0SqiZyR2U3lPVTnXMivpzvsh+JbPeckhYOtY6 LCEwG7szIGjx5XcLpw+N6xv8mrtw/+JeS4plGjOIzHAix7pp5k7ToaaunAOOS0iLp3 7AM6N74BOQbBoeKu7hI868BNhl5HOUzN38YcZPnlMKvL7053BAzqKladg4B3/h0Y3X 9RnnZGaeZbK8CQxAZWmdaLLhLRQahG0vKR2AK6bFuDS8TY4/vewXyny8etzO9h3/Ss 8uLxp2v6VfyWdZ+OI/pVY4035x1ZtdFkguxIhkaldWZ/s5UQIWsBb4z9PjQBDY/pPK hclh8pY+aM/gA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HD0TZ5zJYz9rxG for ; Tue, 21 Sep 2021 01:03:14 +0200 (CEST) From: Alexandr Vityazev Date: Mon, 20 Sep 2021 23:03:29 +0000 Message-ID: <87sfxy4zpa.fsf@posteo.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=avityazev@posteo.org; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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=1632179495; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=B1TvEQvGW/BvUTWgmnP0PUBaejTlcBCFmYOqMCk9+u0=; b=N1yTmKXlSsWjiuN+jjGBcF+GRuHZb3nk65vcov+2MXeYXp79dq/9rBRR+sb6tDilSf7Bxk kKKSXtrvrh6p9YWSlzdkrBUcDPqS7U+QNpxTV9Xzgu+IXG5L4bF8B7hd93mk4cuwC1d+Cn ZLKyOj95TMhZ+V9J0sYqZsBl8KfB/Nv0nBtlrw4gnyuF391Etda0JboFh3F/DbBYH0zlEi W3JN6eHhYeI2wWgqlkOXzVtl1mc/P4Fzq555O30ihowovpp+BgtKtMDcE4HCRbAXwN5m0f 590spG+jqwnO1U/M1YzXne4H4E5w4B+i13dwTFFWspA/CGZwZUkY8B3E9gFIVQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632179495; a=rsa-sha256; cv=none; b=alTeQwMuoRndVUcU8jckgzH4AfN8ymXwpz3d2ORaJ78K6QfsYhtlHFQUz3mlPKVB1DKKrj cGOFLR2zLgfrZ86k0QKJB3fbcbQqfsK6ZEoIyOl3N8JV95yy2o9qch8PNwhgPuO2IXNyoG wzS9UR2s+0T3zBCfXLCdDIIDWpfB+1oDA17kIefTnjrmV25iHU8VQftKmQRECahqiEmthl CKd7as8jKP4Xu5qD1AeEUlaJyfTTAoovfx3/5+eBjuFmQVgM7iladyd2MQUfKhIKYfH5aj V3c1Ti3QHWDnqLGeYQeC2pOj5Uk8gVdPtox75m5AWoK5uXtlizXPlHZw6AJKfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.org header.s=2017 header.b=JGd3+AyW; 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-Spam-Score: -1.29 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.org header.s=2017 header.b=JGd3+AyW; 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: C8F0411AF4 X-Spam-Score: -1.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: N3mu8uaYjPcA * gnu/packages/shellutils.scm (zsh-syntax-highlighting): New variable. --- gnu/packages/shellutils.scm | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 94b5536df7..69e1d0d069 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -138,6 +138,61 @@ text.") as you type.") (license license:expat))) +(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-highlighting") + (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-before 'build 'add-all-md + (lambda _ + (copy-file "docs/highlighters.md" "docs/all.md") + (make-file-writable "docs/all.md") + #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "test") + (invoke "make" "perf")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (zsh-plugins + (string-append out "/share/zsh/plugins/zsh-syntax-highlighting")) + (highlighters-dir (string-append zsh-plugins "/highlighters"))) + (invoke "make" "all") + (install-file "zsh-syntax-highlighting.zsh" zsh-plugins) + (install-file ".version" zsh-plugins) + (install-file ".revision-hash" zsh-plugins) + (copy-recursively "highlighters" highlighters-dir) + #t)))))) + (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 the shell 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 them, particularly in catching syntax errors.") + (license license:expat))) + (define-public sh-z (package (name "sh-z") -- 2.33.0 -- Alexandr Vityazev