]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/commitdiff
Add newline to log HELP for increased readability
authorPooya Moradi <pvonmoradi@gmail.com>
Sun, 15 May 2022 08:31:53 +0000 (13:01 +0430)
committerb3nj4m1n <b3nj4m1n@gmx.net>
Sun, 15 May 2022 10:34:25 +0000 (12:34 +0200)
Add disclaimer about using bat to README

README.md
xdg-ninja.sh

index d5cdc9aec158e71099949eab3154075b8569d6f7..d97b7e83db37051324de0d2d9bdfde8d7b106aae 100644 (file)
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ This will run every test in the default configuration.
 
 ### Optional
 
 
 ### Optional
 
-- [glow](https://repology.org/project/glow/packages) or [bat](https://repology.org/project/bat-cat/packages) for rendering markdown in the terminal
+- [glow](https://repology.org/project/glow/packages) for rendering markdown in the terminal ([bat](https://repology.org/project/bat-cat/packages) can be used as a fallback, but glows output is clearer and therefore recommended)
 - [cabal](https://repology.org/project/cabal/packages) for compiling the helper program for creating configurations
 
 ## Configuration
 - [cabal](https://repology.org/project/cabal/packages) for compiling the helper program for creating configurations
 
 ## Configuration
index c7b4ab21d9fcf313a4ad4030a8547c6f70c244dc..d873df2b11d60a0f13b7b6ab19d6d6372d43d886 100755 (executable)
@@ -7,10 +7,12 @@ if command -v glow >/dev/null 2>/dev/null; then
     USE_GLOW=true
 elif command -v bat >/dev/null 2>/dev/null; then
     USE_BAT=true
     USE_GLOW=true
 elif command -v bat >/dev/null 2>/dev/null; then
     USE_BAT=true
+    printf "Glow not found, markdown rendering will be done by bat.\n"
+    printf "Install glow for easier reading & copy-paste.\n"
 else
     printf "Glow or bat not found, markdown rendering not available.\n"
     printf "Output will be raw markdown and might look weird.\n"
 else
     printf "Glow or bat not found, markdown rendering not available.\n"
     printf "Output will be raw markdown and might look weird.\n"
-    printf "Install glow or bat for easier reading & copy-paste.\n"
+    printf "Install glow for easier reading & copy-paste.\n"
 fi
 
 unalias -a
 fi
 
 unalias -a
@@ -126,11 +128,11 @@ log() {
 
     HELP)
         if $USE_GLOW; then
 
     HELP)
         if $USE_GLOW; then
-            printf "%s" "$HELP" | glow -
+            printf "%s\n" "$HELP" | glow -
         elif $USE_BAT; then
         elif $USE_BAT; then
-            printf "%s" "$HELP" | bat -pp -f --language markdown
+            printf "%s\n" "$HELP" | bat -pp -f --language markdown
         else
         else
-            printf "%s" "$HELP"
+            printf "%s\n" "$HELP"
         fi
         ;;
 
         fi
         ;;