Last active
December 9, 2016 19:08
-
-
Save colstrom/233bcc9b044fe8e8a058d6f0850319cc to your computer and use it in GitHub Desktop.
gistpkg-install.fish: installs packages from gists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gistpkg-install --argument package | |
| set --local package (gistpkg-config root)/(sanitize-git-remote-url $package) | |
| test (is-a-directory (gistpkg-config fish/functions)) = false | |
| and mkdir -p (gistpkg-config fish/functions) | |
| if test (count $package/*.fish) -eq 0 | |
| printf "%s contains no .fish files" $package | |
| return 0 | |
| end | |
| ln -sf $package/*.fish (gistpkg-config fish/functions)/ | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name = gistpkg-install | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/gistpkg-install | |
| requires | |
| command/ln | |
| command/mkdir | |
| fish/builtin/and | |
| fish/builtin/count | |
| fish/builtin/end | |
| fish/builtin/false | |
| fish/builtin/function | |
| fish/builtin/if | |
| fish/builtin/printf | |
| fish/builtin/return | |
| fish/builtin/set | |
| fish/builtin/test | |
| fish/functions/gistpkg-config | |
| fish/functions/is-a-directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment