Skip to content

Instantly share code, notes, and snippets.

@OrenBochman
Forked from sddamico/gistp.sh
Created November 1, 2018 10:54
Show Gist options
  • Select an option

  • Save OrenBochman/c53dd3f3d73b6b7d3f0e8d8f07883e9b to your computer and use it in GitHub Desktop.

Select an option

Save OrenBochman/c53dd3f3d73b6b7d3f0e8d8f07883e9b to your computer and use it in GitHub Desktop.

Revisions

  1. @sddamico sddamico revised this gist Apr 9, 2015. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions gistp.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    76 gistp() {¬
    77 if [ -z "$1" ] ; then¬
    78 echo "Must supply filename for new gist"¬
    79 exit(1)¬
    80 else¬
    ~ 81 gisturl=$(pbpaste | gist -f $1)¬
    + 82 echo "Copying $gisturl to clipboard"¬
    + 83 echo "$gisturl" | pbcopy¬
    84 fi¬
    85 }¬
    gistp() {
    if [ -z "$1" ] ; then
    echo "Must supply filename for new gist"
    exit(1)
    else
    gisturl=$(pbpaste | gist -f $1)
    echo "Copying $gisturl to clipboard"
    echo "$gisturl" | pbcopy
    fi
    }
  2. @sddamico sddamico created this gist Apr 9, 2015.
    10 changes: 10 additions & 0 deletions gistp.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    76 gistp() {¬
    77 if [ -z "$1" ] ; then¬
    78 echo "Must supply filename for new gist"¬
    79 exit(1)¬
    80 else¬
    ~ 81 gisturl=$(pbpaste | gist -f $1)¬
    + 82 echo "Copying $gisturl to clipboard"¬
    + 83 echo "$gisturl" | pbcopy¬
    84 fi¬
    85 }¬