Move repo search prefix out to config
This commit is contained in:
@ -7,4 +7,4 @@ REPOSITORY_BASE=~/src
|
|||||||
# If a variable is only to be used by a single script, by custom it will be
|
# If a variable is only to be used by a single script, by custom it will be
|
||||||
# prefixed with the name of the script.
|
# prefixed with the name of the script.
|
||||||
|
|
||||||
REPO_DEFAULT_SEARCH_PREFIX="github.com/buildkite"
|
REPO_DEFAULT_SEARCH_PREFIX="github.com/buildkite/"
|
||||||
|
|||||||
2
repo
2
repo
@ -27,7 +27,7 @@ repos=$(find "${REPOSITORY_BASE}" -name '.git' | sed "s|${REPO_BASE}/||" | sed '
|
|||||||
# Default to searching within github.com, because that's by far the most common
|
# Default to searching within github.com, because that's by far the most common
|
||||||
# place for repos to be.
|
# place for repos to be.
|
||||||
# selected=$(echo "${repos}" | gum filter --header="Pick a repo" --prompt="Repo: " --height=20 --value "github.com/${1}")
|
# selected=$(echo "${repos}" | gum filter --header="Pick a repo" --prompt="Repo: " --height=20 --value "github.com/${1}")
|
||||||
selected="$(echo "${repos}" | fzf -1 -0 -q "github.com/buildkite/${1}" --prompt="Repo: ")"
|
selected="$(echo "${repos}" | fzf -1 -0 -q "${REPO_DEFAULT_SEARCH_PREFIX}${1}" --prompt="Repo: ")"
|
||||||
|
|
||||||
echo "$REPOSITORY_BASE/$selected"
|
echo "$REPOSITORY_BASE/$selected"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user