Thread (13 messages) 13 messages, 3 authors, 2016-06-15

Re: [PATCH 8/9] test: replace shebangs with descriptions in shell libraries

From: Eric Sunshine <hidden>
Date: 2016-06-15 22:59:19

On Mon, Nov 25, 2013 at 4:03 PM, Jonathan Nieder [off-list ref] wrote:
quoted hunk ↗ jump to hunk
A #! line in these files is misleading, since these scriptlets are
meant to be sourced with '.' (using whatever shell sources them)
instead of run directly using the interpreter named on the #! line.

Removing the #! line shouldn't hurt syntax highlighting since
these files have filenames ending with '.sh'.  For documentation,
add a brief description of how the files are meant to be used in
place of the shebang line.

Signed-off-by: Jonathan Nieder <redacted>
---
diff --git a/t/lib-bash.sh b/t/lib-bash.sh
index 11397f7..10b76df 100644
--- a/t/lib-bash.sh
+++ b/t/lib-bash.sh
@@ -1,7 +1,6 @@
-#!/bin/sh
-#
-# Ensures that tests are run under Bash; primarily intended for running tests
-# of the completion script.
+# Shell library sourced instead of ./test-lib.sh by tests that need
+# to run under Bash; primary intended for tests of the completion
s/primary/primarily/
+# script.

 if test -n "$BASH" && test -z "$POSIXLY_CORRECT"; then
        # we are in full-on bash mode
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help