From 51ab50d08122c5c6df281537a2d7dc350a49413e Mon Sep 17 00:00:00 2001 From: jsnal Date: Fri, 15 May 2020 17:11:19 -0400 Subject: [PATCH] refactor(pull request): update quotes and new line Add quotes around variables so the script is more POSIX compliant. Also add new line for styling. --- flash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flash b/flash index 1f63108..9c745f6 100755 --- a/flash +++ b/flash @@ -209,11 +209,11 @@ done # Set some parameters for preview command used by FZF -while [[ -z $PREVIEWER_PARAMTERS ]]; do - case $PREVIEWER in +while [ -z "$PREVIEWER_PARAMTERS" ]; do + case "$PREVIEWER" in bat) PREVIEWER_PARAMTERS="--theme='Solarized (dark)' --style=numbers --color=always" ;; cat) PREVIEWER_PARAMTERS="--number" ;; - *) echo -e "$PREVIEWER is not a valid previewer. Use 'bat' or 'cat'. Falling back on default..." && read -r -s -p 'Press [Enter] to continue...' && PREVIEWER='bat' ;; + *) echo -e "$PREVIEWER is not a valid previewer. Use 'bat' or 'cat'. Falling back on default...\n" && read -r -s -p 'Press [Enter] to continue...' && PREVIEWER='bat' ;; esac done