Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

push: make clipboard copying work in Linux

  • Loading branch information...
commit 57b8d4234fce3d00ba8326a80a92eac87e93d1a5 1 parent b692f10
@mmalecki mmalecki authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 push
View
6 push
@@ -41,11 +41,13 @@ if [[ "$remote_url" =~ "github.com" ]]; then
repo_name=$(echo $remote_url | sed 's/.*\:\(.*\)\.git/\1/')
github_url="https://github.com/$repo_name/compare/$refs"
- which -s pbcopy && echo $github_url | pbcopy && echo "Compare URL copied to clipboard!"
+ copied="Compare URL copied to clipboard!"
+ which -s pbcopy >& /dev/null && echo $github_url | pbcopy && echo $copied
+ which xclip >& /dev/null && echo $github_url | xclip -selection clipboard && echo $copied
# which -s open && open -g $github_url
echo $github_url
echo
fi
-exit 0
+exit 0
Please sign in to comment.
Something went wrong with that request. Please try again.