Skip to content

Commit

Permalink
fix: allow using --select-nth with --continue (#1366)
Browse files Browse the repository at this point in the history
Co-authored-by: port19 <port19@port19.xyz>
Co-authored-by: Mori Zen <71zenith@proton.me>
  • Loading branch information
3 people authored Jun 14, 2024
1 parent 9e8ea4a commit e4da399
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ani-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version_number="4.8.9"
version_number="4.8.10"

# UI

Expand Down Expand Up @@ -427,7 +427,8 @@ case "$search" in
anime_list=$(while read -r ep_no id title; do process_hist_entry & done <"$histfile")
wait
[ -z "$anime_list" ] && die "No unwatched series in history!"
id=$(printf "%s" "$anime_list" | nl -w 2 | sed 's/^[[:space:]]//' | nth "Select anime: " | cut -f1)
[ -z "${index##*[!0-9]*}" ] && id=$(printf "%s" "$anime_list" | nl -w 2 | sed 's/^[[:space:]]//' | nth "Select anime: " | cut -f1)
[ -z "${index##*[!0-9]*}" ] || id=$(printf "%s" "$anime_list" | sed -n "${index}p" | cut -f1)
[ -z "$id" ] && exit 1
title=$(printf "%s" "$anime_list" | grep "$id" | cut -f2 | sed 's/ - episode.*//')
ep_list=$(episodes_list "$id")
Expand Down

0 comments on commit e4da399

Please sign in to comment.