-
Notifications
You must be signed in to change notification settings - Fork 801
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the latest changes, gum has also been updated to version 0.17.0, which includes the ability to press 'ESC' to exit the file option selection.
However, I would suggest a more dynamic approach, still using choose.
UNINSTALLER_LIST=() while IFS= read -r path; do UNINSTALLER_LIST+=("$(basename "$path" | sed 's/\.sh$//')") done < <(find "$OMAKUB_PATH/uninstall" -mindepth 1 -maxdepth 1 -type f | sort) CHOICE=$(gum choose "${UNINSTALLER_LIST[@]}" "<< Back" --header "Uninstall application" --height "$((${#UNINSTALLER_LIST[@]} + 2))") if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then # Don't uninstall anything echo "" else [ -n "$CHOICE" ] && gum confirm "Run uninstaller?" && source "$CHOICE" && gum spin --spinner globe --title "Uninstall completed!" -- sleep 3 fi clear source $OMAKUB_PATH/bin/omakub
This way, the --height is also managed dynamically without passing a value that needs to be updated each time.
Pedro-Appel
commented
Nov 2, 2025
I'm currently looking to update GUM version, I think the ESC functionality is a great bonus, and the newest version has a lot of bug fixes
Kasui92
commented
Nov 3, 2025
I'm currently looking to update GUM version, I think the ESC functionality is a great bonus, and the newest version has a lot of bug fixes
Yep, the latest version of gum has significantly simplified the use of the file command.
However, even for future developments (e.g., multiple choice), choose can be a valid solution.
_Hi, this is my first OSS contribution ever and I'm very happy to be doing for this project.
I have been developing something like this project but for personal use only, with my own preferences and to see this project evolve as it is shines my eyes._
About the feature.
I noticed that using the installer was different than other components.
I just made a little adjustments and tested locally.