Skip to content

Instantly share code, notes, and snippets.

@aal89
Last active December 17, 2019 16:34
Show Gist options
  • Save aal89/58e254efeb0fca76db6daa521fec40f9 to your computer and use it in GitHub Desktop.
Save aal89/58e254efeb0fca76db6daa521fec40f9 to your computer and use it in GitHub Desktop.

Revisions

  1. aal89 revised this gist Dec 17, 2019. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions .bash_profile
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    alias gp='function __gp() { (python3 ~/Documents/python/$1.py $(shift;printf "$*") 2>/dev/null) || echo "File not found or errors occurred."; unset -f __gp; }; __gp'

    # usage: gp hiworld (assumption hiworld.py is an actual file)
    # output: whatever the script outputs

    # usage: gp sub/dir/hiworld (assumption sub/dir/hiworld.py is an actual file)
    # output: whatever the script outputs
    # (assumption hiworld.py is an actual file)
    #
    # usage: gp hiworld
    # usage: gp sub/dir/hiworld arg0 arg1
    #
  2. aal89 revised this gist Dec 17, 2019. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions .bash_profile
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    alias gp='function __gp() { (python3 ~/Documents/python/$1.py $(shift;printf "$*") 2>/dev/null) || echo "File not found or errors occurred."; unset -f __gp; }; __gp'

    # usage: gp hiworld (assumption hiworld.py is an actual file)
    # output: whatever the script outputs

    # usage: gp sub/dir/hiworld (assumption sub/dir/hiworld.py is an actual file)
    # output: whatever the script outputs
  3. aal89 revised this gist Dec 17, 2019. No changes.
  4. aal89 created this gist Dec 17, 2019.
    3 changes: 3 additions & 0 deletions .bash_profile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    alias gp='function __gp() { (python3 ~/Documents/python/$1.py $(shift;printf "$*") 2>/dev/null) || echo "File not found or errors occurred."; unset -f __gp; }; __gp'
    # usage: gp hiworld (assumption hiworld.py is an actual file)
    # output: whatever the script outputs