From cb542a4573d8e367d73c7d9f88d1ac287cd4fd19 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Mon, 7 Jul 2025 21:34:11 +0200 Subject: Continue early in __bass_print if stdout is a tty This allows us to simplify the code a bit by removing a copied line. --- functions/bass.fish | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/functions/bass.fish b/functions/bass.fish index dee4074..b0dd220 100644 --- a/functions/bass.fish +++ b/functions/bass.fish @@ -31,7 +31,10 @@ function __bass_print if not isatty stdout echo $file - else if set -q _flag_playlist + continue + end + + if set -q _flag_playlist set -l current (mpc -f "%position%" current) if test "$position" = "$current" @@ -39,11 +42,9 @@ function __bass_print else echo -n " " end - - __bass_print_track $title $artist $album - else - __bass_print_track $title $artist $album end + + __bass_print_track $title $artist $album end end -- cgit v1.2.3-2-gb3c3