aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Müller2025-07-07 21:34:11 +0200
committerWolfgang Müller2025-07-07 21:34:11 +0200
commitcb542a4573d8e367d73c7d9f88d1ac287cd4fd19 (patch)
treed71884ea6676c7e7022b9fe2d12f2a713c3f6fa9
parentcf8612927728c88f36f7a76c2130567f6ad586d2 (diff)
downloadbass-cb542a4573d8e367d73c7d9f88d1ac287cd4fd19.tar.gz
Continue early in __bass_print if stdout is a ttyHEADtrunk
This allows us to simplify the code a bit by removing a copied line.
Diffstat (limited to '')
-rw-r--r--functions/bass.fish11
1 files 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