Skip to content

Commit

Permalink
feat: add some more git alias and update oscclip script
Browse files Browse the repository at this point in the history
  • Loading branch information
mike325 committed Aug 1, 2023
1 parent 7a7c73d commit 9226e2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 2 additions & 8 deletions bin/oscclip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,11 @@ while [[ $# -gt 0 ]]; do
error_msg "Cannot use -i and - together"
exit 1
fi
if [[ -p $2 ]]; then
while IFS= read -r line; do
FROM_STDIN+=("$line")
done <"$2"
else
CLIP="$2"
fi
CLIP="$2"
shift
;;
-)
if [[ -n $CLIP ]]; then
if [[ -n $CLIP ]]; then
error_msg "Cannot use -i and - together"
exit 1
fi
Expand Down
6 changes: 6 additions & 0 deletions git/gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@
ss = "!f(){ git --no-pager stash save $1; }; f"
sd = "!f(){ git --no-pager stash drop stash@{${1:-0}}; }; f"

; manage last stash
swl = "!f(){ git stash show -p stash@{$(($(git stash list | wc -l) - 1))}; }; f"
sal = "!f(){ git --no-pager stash apply stash@{$(($(git stash list | wc -l) - 1))}; }; f"
spl = "!f(){ git --no-pager stash pop stash@{$(($(git stash list | wc -l) - 1))}; }; f"
sdl = "!f(){ git --no-pager stash drop stash@{$(($(git stash list | wc -l) - 1))}; }; f"

; --------- Below here credits to https://github.com/alrra/dotfiles ---------
; Remove the tag with the specified tag name if exists and tag the latest
; commit with that name.
Expand Down

0 comments on commit 9226e2a

Please sign in to comment.