From 0bc7201fb655d33c6eae38c33ef0521d772b9a52 Mon Sep 17 00:00:00 2001 From: zlg Date: Sat, 16 Oct 2021 13:05:01 -0700 Subject: helpers.sh: improve vgmulti --- scripts/helpers.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 69aa59a..3656032 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -35,17 +35,9 @@ function vgub() { vgstash list done -w 80 | sed -e '1,2d' | sort | uniq -w50 | sort -b -t'|' -k 2,2 } -# Shows you the games that have more than one entry (by title) in vgstash. -# Helpful for seeing games you own or have owned more than one copy of. +# Shows you the titles of games that you own on more than one system. function vgmulti() { - # TODO: improve - if [ -n $1 ]; then - local filter="$1" - else - local filter="allgames" - fi - vgstash list -w 80 | head -n 2 - vgstash list $filter -w 80 | sort | uniq -D -w50 + vgstash list owned -w 80 | sed -e '1,2d' | sort -b -t'|' -k 1,1 | uniq -d -w50 | cut -d'|' -f 1 } # Prints the title and system of a random game that you need to beat. -- cgit v1.2.3-54-g00ecf