App-git-hub
view release on metacpan or search on metacpan
share/lib/git-hub.d/git-hub-open view on Meta::CPAN
#!/usr/bin/env bash
# Try this vim command:
#
# map \gho :let $l=line(".")<cr>:let $p=@%<cr>:!git hub open $p $l<cr><cr>
set -e
command:open() {
local options=()
"$raw_output" && options+=(--raw)
[ -n "$remote_name" ] && options+=(--remote "$remote_name")
set -- "${command_arguments[@]}"
share/lib/git-hub.d/git-hub-url view on Meta::CPAN
#!/usr/bin/env bash
# Try this vim command:
#
# :map \ghu :let $l=line(".")<cr>:let $p=@%<cr>:!echo -n "$(git hub url $p $l)" \| xsel -b<cr><cr>
set -e
command:url() {
set -- "${command_arguments[@]}"
local path= line=
if inside-git-repo && [ $# -gt 0 ] && [ -e "$1" ]; then
path="$1"
path="${path%/}"
share/lib/git-hub.d/json.bash view on Meta::CPAN
JSON_NUM='-?(0|[1-9][0-9]*)([.][0-9]+)?([eE][+-]?[0-9]+)?'
JSON_BOOL='null|false|true'
JSON_SPACE='[[:space:]]+'
JSON_PUNCT='[][{}:,]'
JSON_OTHER='.'
JSON_SCALAR="^($JSON_STR|$JSON_NUM|$JSON_BOOL)$"
JSON_TOKEN="$JSON_STR|$JSON_NUM|$JSON_BOOL|$JSON_PUNCT|$JSON_SPACE|$JSON_OTHER"
JSON.lex() {
local GREP_COLORS GREP_COLOR
\grep -Eo "$JSON_TOKEN" | \grep -Ev "^$JSON_SPACE$"
}
JSON.parse() {
read -r JSON_token
case "$JSON_token" in
'{') JSON.parse-object '' ;;
'[') JSON.parse-array '' ;;
*) JSON.parse-error "'{' or '['";;
esac
}
( run in 0.244 second using v1.01-cache-2.11-cpan-87723dcf8b7 )