CARVIEW |
Select Language
HTTP/2 302
date: Tue, 22 Jul 2025 07:34:52 GMT
content-type: text/html; charset=utf-8
content-length: 0
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
access-control-allow-origin:
location: https://raw.githubusercontent.com/bashup/loco/master/bin/loco
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
x-github-request-id: CD04:20052A:2A41C5:2F0B3A:687F3F1C
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: W/"7b33817cc543fa29169a3edf4de3df6bbc9574a2f34ad4cc688c93a903990c04"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: C905:37A430:53735:8A1AC:687F3F1C
content-encoding: gzip
accept-ranges: bytes
date: Tue, 22 Jul 2025 07:34:53 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210037-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753169693.946093,VS0,VE272
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
x-fastly-request-id: 39e878c069313811b01e43cf6fa3bb963a5633f5
expires: Tue, 22 Jul 2025 07:39:53 GMT
source-age: 0
content-length: 2616
#!/usr/bin/env bash
# ---
# This file is automatically generated from loco.md - DO NOT EDIT
# ---
# MIT License
#
# Copyright (c) 2017 PJ Eby
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
# modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
# is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#!/usr/bin/env bash
realpath.location(){ realpath.follow "$1"; realpath.absolute "$REPLY" ".."; }
realpath.resolved(){ realpath.follow "$1"; realpath.absolute "$REPLY"; }
realpath.dirname() { if [[ $1 =~ /+[^/]+/*$ ]]; then REPLY="${1%${BASH_REMATCH[0]}}"; REPLY=${REPLY:-/}; else REPLY=.; fi }
realpath.basename(){ if [[ $1 =~ /*([^/]+)/*$ ]]; then REPLY="${BASH_REMATCH[1]}"; else REPLY=/; fi }
realpath.follow() {
local target
while [[ -L "$1" ]] && target=$(readlink -- "$1"); do
realpath.dirname "$1"
# Resolve relative to symlink's directory
[[ $REPLY != . && $target != /* ]] && REPLY=$REPLY/$target || REPLY=$target
# Break out if we found a symlink loop
for target; do [[ $REPLY == "$target" ]] && break 2; done
# Add to the loop-detect list and tail-recurse
set -- "$REPLY" "$@"
done
REPLY="$1"
}
realpath.absolute() {
REPLY=$PWD; local eg=extglob; ! shopt -q $eg || eg=; ${eg:+shopt -s $eg}
while (($#)); do case $1 in
/*) REPLY=/; set -- "${1##+(/)}" "${@:2}" ;;
*/*) set -- "${1%%/*}" "${1##${1%%/*}+(/)}" "${@:2}" ;;
''|.) shift ;;
..) realpath.dirname "$REPLY"; shift ;;
*) REPLY="${REPLY%/}/$1"; shift ;;
esac; done; ${eg:+shopt -u $eg}
}
realpath.canonical() {
realpath.follow "$1"; set -- "$REPLY" # $1 is now resolved
realpath.basename "$1"; set -- "$1" "$REPLY" # $2 = basename $1
realpath.dirname "$1"
[[ $REPLY != "$1" ]] && realpath.canonical "$REPLY"; # recurse unless root
realpath.absolute "$REPLY" "$2"; # combine canon parent w/basename
}
realpath.relative() {
local target=""
realpath.absolute "$1"; set -- "$REPLY" "${@:2}"; realpath.absolute "${2-$PWD}" X
while realpath.dirname "$REPLY"; [[ "$1" != "$REPLY" && "$1" == "${1#${REPLY%/}/}" ]]; do
target=../$target
done
[[ $1 == "$REPLY" ]] && REPLY=${target%/} || REPLY="$target${1#${REPLY%/}/}"
REPLY=${REPLY:-.}
}
# For documentation, see https://github.com/bashup/loco
set -euo pipefail
fn_exists() { declare -F -- "$1"; } >/dev/null
fn_copy() { REPLY="$(declare -f "$1")"; eval "$2 ${REPLY#$1}"; }
findup() { walkup "${1:-$PWD}" reply_if_exists "${@:2}"; }
reply_if_exists() {
local pat dir=$1 IFS= ; shift
for pat; do
for REPLY in ${dir%/}/$pat; do [[ -f "$REPLY" ]] && return 0; done
done
return 1
}
walkup() {
realpath.absolute "$1"
until set -- "$REPLY" "${@:2}"; "$2" "$1" "${@:3}"; do
[[ "$1" != "/" ]] || return 1; realpath.dirname "$1"
done
}
_loco_usage() { loco_error "Usage: $LOCO_COMMAND command args..."; }
_loco_error() { echo "$@" >&2; exit 64; }
_loco_cmd() { REPLY="$LOCO_NAME.$1"; }
_loco_exec() { loco_error "Unrecognized command: $1"; }
_loco_exists() { type -t "$1"; } >/dev/null
_loco_do() {
[[ "${1-}" ]] || loco_usage # No command given, exit w/usage
REPLY=""; loco_cmd "$1"; local cmd="$REPLY"
[[ "$cmd" ]] || loco_usage # Unrecognized command, exit w/usage
if loco_exists "$cmd"; then
# Command, alias, function, or builtin exists
shift; "$cmd" "$@"
else
# Invoke the default command interpreter
loco_exec "$@"
fi
}
_loco_findproject() {
# shellcheck disable=SC2015 # plain var assign can't be false
findup "$LOCO_PWD" "${LOCO_FILE[@]}" && LOCO_PROJECT=$REPLY ||
loco_error "Can't find $LOCO_FILE here";
}
_loco_preconfig() { true; }
_loco_postconfig() { true; }
_loco_findroot() { realpath.dirname "$LOCO_PROJECT"; LOCO_ROOT=$REPLY; }
_loco_loadproject() { cd "$LOCO_ROOT"; $LOCO_LOAD "$1"; }
_loco_site_config() { source "$1"; }
_loco_user_config() { source "$1"; }
# Find our configuration, exposing relevant paths and defaults
# shellcheck disable=SC2034 # some vars are only used by extending scripts
_loco_config() {
LOCO_ARGS=("$@")
loco_preconfig "$@"
${LOCO_COMMAND:+:} realpath.basename "$LOCO_SCRIPT"; LOCO_COMMAND="${LOCO_COMMAND-$REPLY}"
LOCO_NAME="${LOCO_NAME-${LOCO_COMMAND}}"
LOCO_PWD="${LOCO_PWD-$PWD}"
LOCO_SITE_CONFIG="${LOCO_SITE_CONFIG-/etc/$LOCO_NAME/config}"
[ -f "$LOCO_SITE_CONFIG" ] && loco_site_config "$LOCO_SITE_CONFIG"
LOCO_RC="${LOCO_RC-.${LOCO_NAME}rc}"
LOCO_USER_CONFIG="${LOCO_USER_CONFIG-$HOME/$LOCO_RC}"
[ -f "$LOCO_USER_CONFIG" ] && loco_user_config "$LOCO_USER_CONFIG"
[[ ${LOCO_FILE-} ]] || LOCO_FILE=(".$LOCO_NAME")
LOCO_LOAD="${LOCO_LOAD-source}"
loco_postconfig "$@"
}
_loco_main() {
loco_config "$@"
fn_exists "$LOCO_NAME" || eval "$LOCO_NAME() { loco_do \"\$@\"; }"
${LOCO_PROJECT:+:} loco_findproject "$@"
${LOCO_ROOT:+:} loco_findroot "$@"
loco_loadproject "$LOCO_PROJECT"
loco_do "$@"
}
# Initialize default function implementations
for f in $(compgen -A function _loco_); do
fn_exists "${f#_}" || fn_copy "$f" "${f#_}"
done
# Clear all LOCO_* variables before beginning
for lv in ${!LOCO_@}; do unset "$lv"; done
LOCO_SCRIPT=$0
if [[ $0 == "${BASH_SOURCE-}" ]]; then loco_main "$@"; fi