From 9d76d983c44a6fe58656598bfae046a0eed2c6f3 Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Tue, 23 Apr 2019 19:28:41 +0200 Subject: [PATCH 1/5] add doctor for shell and update readme --- modules/lang/sh/README.org | 12 ++++++++---- modules/lang/sh/doctor.el | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 modules/lang/sh/doctor.el diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index 8ee01d3d9..782344eb9 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -9,14 +9,18 @@ This module adds support for shell scripting languages. * Table of Contents :TOC: - [[#install][Install]] + - [[#dependencies][Dependencies]] - [[#appendix][Appendix]] - [[#commands][Commands]] * Install -This module has no dependencies. +** Dependencies +This module has one soft dependency: + ++ ~shellcheck~ Enables shell script linting. * Appendix ** Commands -| command | key / ex command | description | -|------------+------------------+-------------------------------------------------------| -| ~+sh/repl~ | =:repl= | Open a terminal (or send the current selection to it) | +| command | key / ex command | description | +|-----------------+------------------+-------------------------------------------------------| +| ~+sh/open-repl~ | =:repl= | Open a terminal (or send the current selection to it) | diff --git a/modules/lang/sh/doctor.el b/modules/lang/sh/doctor.el new file mode 100644 index 000000000..0a9687a29 --- /dev/null +++ b/modules/lang/sh/doctor.el @@ -0,0 +1,5 @@ +;;; lang/sh/doctor.el -*- lexical-binding: t; -*- + +(when! (not (executable-find "shellcheck")) + (warn! "Couldn't find shellcheck. Shell script linting will not work")) + From ae11d92042b1e864bcc35f88bda488881aebd48d Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Tue, 23 Apr 2019 20:08:52 +0200 Subject: [PATCH 2/5] ony search for shellcheck executable when flycheck is enabled --- modules/lang/sh/doctor.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/lang/sh/doctor.el b/modules/lang/sh/doctor.el index 0a9687a29..e85643b71 100644 --- a/modules/lang/sh/doctor.el +++ b/modules/lang/sh/doctor.el @@ -1,5 +1,5 @@ ;;; lang/sh/doctor.el -*- lexical-binding: t; -*- -(when! (not (executable-find "shellcheck")) - (warn! "Couldn't find shellcheck. Shell script linting will not work")) - +(when (featurep! :tools flycheck) + (unless (executable-find "shellcheck") + (warn! "Couldn't find shellcheck. Shell script linting will not work"))) From 032568e308057517a1bd6e5ea1afa135e4401417 Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Sat, 4 May 2019 08:07:43 +0200 Subject: [PATCH 3/5] update table of contents, remove commands doc --- modules/lang/sh/README.org | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index 8f7b62a43..2471029db 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -8,19 +8,11 @@ This module adds support for shell scripting languages. + REPL support * Table of Contents :TOC: -- [[Install][Install]] - - [[Dependencies][Dependencies]] -- [[Appendix][Appendix]] - - [[Commands][Commands]] +- [[#install][Install]] + - [[#dependencies][Dependencies]] * Install ** Dependencies This module has one soft dependency: + ~shellcheck~ Enables shell script linting. - -* Appendix -** Commands -| command | key / ex command | description | -|-----------------+------------------+-------------------------------------------------------| -| ~+sh/open-repl~ | =:repl= | Open a terminal (or send the current selection to it) | From 110c2ffeb9ecf9a88e4534e11081e5871a28d455 Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Sat, 4 May 2019 08:16:49 +0200 Subject: [PATCH 4/5] improve readme, remove comments about dependencies --- modules/lang/sh/README.org | 4 +++- modules/lang/sh/packages.el | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index 2471029db..c1660bc47 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -13,6 +13,8 @@ This module adds support for shell scripting languages. * Install ** Dependencies -This module has one soft dependency: +This module has several soft dependencies: + ~shellcheck~ Enables shell script linting. ++ ~bashdb~ Enables debugging for bash scripts. ++ ~zshdb~ Enables debugging for zsh scripts. diff --git a/modules/lang/sh/packages.el b/modules/lang/sh/packages.el index d3e3ad9e1..b52024fd5 100644 --- a/modules/lang/sh/packages.el +++ b/modules/lang/sh/packages.el @@ -1,9 +1,6 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/sh/packages.el -;; requires shellcheck -;; optional: zshdb bashdb - (when (featurep! :completion company) (package! company-shell)) From c692848cc3e1b5659ad4a07d446cf38d928fa6d3 Mon Sep 17 00:00:00 2001 From: chrunchyjesus Date: Sat, 4 May 2019 08:26:13 +0200 Subject: [PATCH 5/5] update readme --- modules/lang/sh/README.org | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/lang/sh/README.org b/modules/lang/sh/README.org index c1660bc47..b2821e7bf 100644 --- a/modules/lang/sh/README.org +++ b/modules/lang/sh/README.org @@ -4,8 +4,7 @@ This module adds support for shell scripting languages. + Code completion (company-shell) + Syntax Checking (flycheck) -+ Added command substitution and variable interpolation fontification -+ REPL support ++ Added variable interpolation fontification * Table of Contents :TOC: - [[#install][Install]]