Skip to content
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

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

Open
wants to merge 4 commits into
base: stable
Choose a base branch
from

Conversation

kyriakosschwarz
Copy link

The integer shell parameter now can be arbitrarily large. Previously 1-9.

Copy link
Member

@zoispag zoispag left a comment

Choose a reason for hiding this comment

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

It was originally supposed to be a "quick start" feature, which explains the 1-9 implementation. Nevertheless, I am totally in favor of such a change, as long as it is working correctly. 👍🏼

+([1-9])) does not take zeros into account, so shelldio 10 will lead to "wrong selection" response.

By the way, we also need to make sure that extended glob (shopt -s extglob) is available on all platforms, including different Linux flavors and macOS.

@@ -301,7 +304,7 @@ self_update() {

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 και έβγαλε Λάθος επιλογή

@cerebrux
Copy link

Δοκιμές:

  1. Όταν δεν έχεις λίστα με αγαπημένα (δεν υπάρχει αρχείο ~/.shelldio/my_stations.txt) τότε το Shelldio μπορείς να το τρέξεις με όποιον αριθμό θες πχ. shelldio 135
  2. Όταν όμως έχεις λίστα με αγαπημένα π.χ. έχεις 20 σταθμούς, δεν μπορείς να επιλέξεις αριθμό πάνω από 10.

Άρα η λύση που προτείνει ο @kyriakosschwarz δουλεύει μια χαρά αρκεί να μην έχεις αγαπημένη λίστα. Οπότε δεν μπορεί να γίνει ακόμα merge μέχρι να γίνει η απαραίτητη διόρθωση.

@cerebrux cerebrux changed the title Arbitrarily large integer parameter [Feature] Επιλογή σταθμού σε περισσότερες θέσεις από 9 Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants