Skip to content

Commit 2307b20

Browse files
justchokingaroundport19xDerisis13CoolnsX71zenith
committed
feat: if terminal then external menu 0, else 1
Co-authored-by: port19 <port19@port19.xyz> Co-authored-by: Derisis13 <email.felhasznalasra@gmail.com> Co-authored-by: CoolnsX <ansari.tan20@gmail.com> Co-authored-by: chokerman <44473782+justchokingaround@users.noreply.github.com> Co-authored-by: zenith71 <71zenith@protonmail.com>
1 parent ad9dac6 commit 2307b20

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ani-cli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ case "$(uname -a)" in
243243
*) player_function="${ANI_CLI_PLAYER:-mpv}" ;; # Linux OS
244244
esac
245245

246-
use_external_menu="${ANI_CLI_EXTERNAL_MENU:-0}"
246+
[ -t 0 ] && use_external_menu="${ANI_CLI_EXTERNAL_MENU:-0}" || use_external_menu="${ANI_CLI_EXTERNAL_MENU:-1}"
247247
[ "$use_external_menu" = "0" ] && multi_selection_flag="${ANI_CLI_MULTI_SELECTION:-${multi_selection_flag:-"-m"}}"
248248
[ "$use_external_menu" = "1" ] && multi_selection_flag="${ANI_CLI_MULTI_SELECTION:-${multi_selection_flag:-"-multi-select"}}"
249249
cache_dir="${ANI_CLI_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/ani-cli}"

0 commit comments

Comments
 (0)