feat: improving uninstaller experience#527
feat: improving uninstaller experience#527Pedro-Appel wants to merge 2 commits intobasecamp:masterfrom
Conversation
There was a problem hiding this comment.
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/omakubThis way, the --height is also managed dynamically without passing a value that needs to be updated each time.
|
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 |
_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.