Skip to content

[Feature] Επιλογή σταθμού σε περισσότερες θέσεις από 9 #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions shelldio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# Please read the file LICENSE and README for more information.
#

## Enable extended globbing features
shopt -s extglob

### Colors
if [ -t 1 ]; then
RED=$(printf '\033[31m')
Expand Down Expand Up @@ -91,7 +94,7 @@

Αν θέλουμε να ξεκινήσουμε το shelldio με όρισμα τότε αυτό μπορεί να είναι ένα από τα παρακάτω:

<1-9>: Γρήγορη εκκίνηση. Ξεκινάει την αναπαραγωγή του σταθμού απευθείας
<number>: Γρήγορη εκκίνηση. Ξεκινάει την αναπαραγωγή του σταθμού απευθείας
από τη θέση που δόθηκε ως όρισμα χωρίς να εμφανίζει την λίστα αγαπημένων μας.
(π.χ. shelldio 4, ξεκινάει τον σταθμό που βρίσκεται στην θέση 4 από την λίστα των αγαπημένων μας)

Expand Down Expand Up @@ -159,7 +162,7 @@
if [[ $input_station = "q" ]] || [[ $input_station = "Q" ]]; then
echo "Έξοδος..."
exit 0
elif [ "$input_station" -gt 0 ] && [ "$input_station" -le $num ]; then #έλεγχος αν το input είναι μέσα στο εύρος της λίστας των σταθμών

Check warning on line 165 in shelldio.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./shelldio.sh:165:61: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
station=$(sed "${input_station}q;d" "$all_stations")
stathmos_name=$(echo "$station" | cut -d "," -f1)
stathmos_url=$(echo "$station" | cut -d "," -f2)
Expand All @@ -186,7 +189,7 @@
if [[ $remove_station = "q" ]] || [[ $remove_station = "Q" ]]; then
echo "Έξοδος..."
exit 0
elif [ "$remove_station" -gt 0 ] && [ "$remove_station" -le $num ]; then #έλεγχος αν το input είναι μέσα στο εύρος της λίστας των σταθμών

Check warning on line 192 in shelldio.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./shelldio.sh:192:64: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)
station=$(sed "${remove_station}q;d" "$my_stations")
stathmos_name=$(echo "$station" | cut -d "," -f1)
grep -v "$stathmos_name" "$HOME/.shelldio/my_stations.txt" >"$HOME/.shelldio/my_stations.tmp" && mv "$HOME/.shelldio/my_stations.tmp" "$HOME/.shelldio/my_stations.txt"
Expand Down Expand Up @@ -398,7 +401,7 @@

while [ "$1" != "" ]; do
case $1 in
[1-9])
+([1-9]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about 10, 20, 30 etc?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Στην δοκιμή μου, έβαλα 15 αγαπημένα. έτρεξα shelldio 14 και έβγαλε Λάθος επιλογή

clear
break # Συνέχεια στο script για αναπαραγωγή
;;
Expand Down Expand Up @@ -434,8 +437,8 @@
welcome_screen
validate_station_lists
add_stations
validate_station_lists

Check warning on line 440 in shelldio.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). Raw Output: ./shelldio.sh:440:3: info: Command appears to be unreachable. Check usage (or ignore if invoked indirectly). (ShellCheck.SC2317)
exit 0

Check warning on line 441 in shelldio.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). Raw Output: ./shelldio.sh:441:3: info: Command appears to be unreachable. Check usage (or ignore if invoked indirectly). (ShellCheck.SC2317)
;;
-n | --new-station)
welcome_screen
Expand All @@ -455,7 +458,7 @@
;;
--reset)
reset_favorites
exit 0

Check warning on line 461 in shelldio.sh

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). Raw Output: ./shelldio.sh:461:3: info: Command appears to be unreachable. Check usage (or ignore if invoked indirectly). (ShellCheck.SC2317)
;;
-f | --fresh)
welcome_screen
Expand Down