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 downcase | |
| if isatty stdin | |
| switch (count $argv) | |
| case 0 | |
| echo 'usage: downcase <string> [string ...]' | |
| return 100 | |
| case '*' | |
| list $argv | downcase | |
| end | |
| else |
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-config --argument key | |
| set --local key (printf "%s" $key | string replace --all --regex '[[:punct:]]' _) | |
| switch "$key" | |
| case list | |
| list root origin fish_functions keyring | |
| case root | |
| if set --query GISTPKG_ROOT | |
| echo $GISTPKG_ROOT | |
| else |
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 = lines-after | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/lines-after | |
| requires | |
| command/awk |
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 = lines-before | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/lines-before | |
| requires | |
| command/awk |
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 = https-get | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/https-get | |
| requires | |
| command/cat |
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 = github-api | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/github-api | |
| requires | |
| fish/builtin/case |
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-avail --argument username | |
| switch (count $argv) | |
| case 0 | |
| echo 'usage: gistpkg-avail <username>' | |
| return 100 | |
| case '*' | |
| github-api /users/$username/gists | jq -r '.[] | select(.files | keys[] | test("^gistpkg.zpl$")) | [([.owner.login, .id] | join("/")), .description] | @tsv' | |
| end | |
| 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
| function gistpkg-list | |
| set local (gistpkg-config root)/(gistpkg-config origin) | |
| if test (is-a-directory $local) = true | |
| find $local -type d -mindepth 1 -name .git -exec dirname '{}' \; | string replace --all --regex "^$local/" '' | |
| end | |
| 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 = sonar-lexer | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/sonar-lexer | |
| requires | |
| fish/builtin/and |
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 = user-is-root | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/user-is-root | |
| requires | |
| command/id |