Skip to content
New issue

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

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

Already on GitHub? # to your account

Merging changes from Testing into Main, yayyy..... #2

Merged
merged 5 commits into from
Jan 19, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Final touches before merging Testing
  • Loading branch information
kevadesu committed Jan 19, 2025
commit fa004b0c17dd6553ac7232a3512600fab44eb7bb
2 changes: 1 addition & 1 deletion Setup.sh
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ Other: Input any path"
echo "Ok!"
;;
esac
sudo wget -O $INSTALL_PATH/gir https://github.com/Icycoide/Gir/releases/download/v0.2.4/main.sh || echo "FAIL | Either failed download or invalid path or sudo does not exist."
sudo wget -O $INSTALL_PATH/gir https://github.com/Icycoide/Gir/releases/download/v0.2.5/main.sh || echo "FAIL | Either failed download or invalid path or sudo does not exist."
sudo chmod +x $INSTALL_PATH/gir || echo "FAIL | Either insufficient permissions or file does not exist or sudo does not exist."
}

12 changes: 7 additions & 5 deletions main.sh
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

function gir.main() {
clear
MENU_CHOICE=$(gum filter --header.foreground="#fe640b" --unselected-prefix.foreground="#fe640b" --selected-indicator.foreground="#fe640b" --indicator.foreground="#fe640b" --match.foreground="#fe640b" --prompt="| " --indicator=">" --header="Repository: $PWD ($(git branch | grep "*" | sed 's/* //g'))" --placeholder="Option" "Time Machine" "Add addition to last commit" "Edit last commit's message" "Correct an edit to a different branch" "Diff with fancy flag" "Undo file" "Undo commit" "Read file" "Add files to commit" "Remove files from commit" "Commit" "Push changes" "Pull changes" "Stash changes" "Switch branch" "(Destructive) Reset to remote state" "(Re)initialise repository" "Information about current repo" "About" "Quit")
MENU_CHOICE=$(gum filter --header.foreground="#fe640b" --unselected-prefix.foreground="#fe640b" --selected-indicator.foreground="#fe640b" --indicator.foreground="#fe640b" --match.foreground="#fe640b" --prompt="| " --indicator=">" --header="Repository: $PWD ($(git branch | grep "*" | sed 's/* //g'))" --placeholder="Option" "Time Machine" "Add addition to last commit" "Edit last commit's message" "Correct an edit to a different branch" "Diff with fancy flag" "Undo file" "Undo commit" "Read file" "Add files to commit" "Remove files from commit" "Commit" "Push changes" "Pull changes" "Stash changes" "Switch branch" "Make new branch" "(Destructive) Reset to remote state" "(Re)initialise repository" "Information about current repo" "About" "Quit")
case $MENU_CHOICE in
"Time Machine")
gir.timemachine
@@ -55,7 +55,10 @@ function gir.main() {
git stash
;;
"Switch branch")
git checkout $(git branch | gum filter --header.foreground="#fe640b" --selected-indicator.foreground="#fe640b" --indicator.foreground="#fe640b" --match.foreground="#fe640b" --header "Select branch to switch to" --prompt="| " --indicator="> " | sed 's/* //g' | sed 's/ //g')
git checkout $(git branch | gum filter --header.foreground="#fe640b" --selected-indicator.foreground="#fe640b" --indicator.foreground="#fe640b" --match.foreground="#fe640b" --no-strict --header "Select branch to switch to" --prompt="| " --indicator="> " | sed 's/* //g' | sed 's/ //g')
;;
"Make new branch")
git checkout -b $(gum input --cursor.foreground="#fe640b" --placeholder "Enter the name of the new branch (no spaces, only hyphens) or leave empty to cancel. (Basing off $(git branch | grep "*"))")
;;
"(Re)initialise repository")
git init
@@ -103,8 +106,7 @@ function gir.editcommit() {
function gir.wrongbranch() {
gum spin --spinner minidot --title "Undoing last commit..." -- git reset HEAD~ --soft
git stash
CORRECT_BRANCH=$(gum input --placeholder "Input the name of the correct branch")
gum spin --spinner minidot --title "Running git checkout..." -- git checkout $CORRECT_BRANCH
git checkout $(git branch | gum filter --header.foreground="#fe640b" --selected-indicator.foreground="#fe640b" --indicator.foreground="#fe640b" --match.foreground="#fe640b" --no-strict --header "Select the correct branch to commit to" --prompt="| " --indicator="> " | sed 's/* //g' | sed 's/ //g')
git stash pop
git add $(ls | gum filter --header.foreground="#fe640b" --selected-indicator.foreground="#fe640b" --indicator.foreground="#fe640b" --match.foreground="#fe640b" --no-limit --header "Add files" --prompt="| " --indicator="> " --selected-prefix "YES " --unselected-prefix " NO " --placeholder "Press TAB to select, Enter to confirm...")
git commit -m
@@ -136,7 +138,7 @@ $(git --version)
host system kernel: $(uname -sr)

learn more about this release at:
https://github.com/Icycoide/Gir/releases/tag/v0.2.4"
https://github.com/Icycoide/Gir/releases/tag/v0.2.5"
}

function gir.variables() {