### Optional
-- [glow](https://repology.org/project/glow/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
--- /dev/null
+{
+ "files": [
+ {
+ "path": "$HOME/.sdkman",
+ "movable": true,
+ "help": "Export the following environment variables:\n\n```bash\nexport SDKMAN_DIR=\"$XDG_DATA_HOME\"/sdkman\n```\n"
+ }
+ ],
+ "name": "sdkman"
+}
--- /dev/null
+{
+ "files": [
+ {
+ "path": "$HOME/.volta",
+ "movable": true,
+ "help": "Export the following environment variables:\n\n```bash\nexport VOLTA_HOME=\"$XDG_DATA_HOME\"/volta\n```\n"
+ }
+ ],
+ "name": "volta"
+}
#!/usr/bin/env sh
# shellcheck disable=SC2016
-USE_GLOW=true
-if ! command -v glow >/dev/null 2>/dev/null; then
- printf "Glow not found, markdown rendering not available.\n"
+USE_GLOW=false
+USE_BAT=false
+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
+ 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"
printf "Install glow for easier reading & copy-paste.\n"
- USE_GLOW=false
fi
unalias -a
HELP)
if $USE_GLOW; then
- printf "%s" "$HELP" | glow -
+ printf "%s\n" "$HELP" | glow -
+ elif $USE_BAT; then
+ printf "%s\n" "$HELP" | bat -pp -f --language markdown
else
- printf "%s" "$HELP"
+ printf "%s\n" "$HELP"
fi
;;