diff --git a/bin/oscclip.sh b/bin/oscclip.sh index ae1557e..0121650 100755 --- a/bin/oscclip.sh +++ b/bin/oscclip.sh @@ -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 diff --git a/git/gitconfig b/git/gitconfig index b6810fb..910297a 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -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.