Just go if there's only one (likely) result
This commit is contained in:
5
repo
5
repo
@ -20,11 +20,12 @@
|
|||||||
|
|
||||||
REPO_BASE=${HOME}/src
|
REPO_BASE=${HOME}/src
|
||||||
|
|
||||||
repos=$(find -s ${REPO_BASE} -maxdepth 3 -mindepth 3 -type d | sed "s|${REPO_BASE}/||")
|
repos=$(find -s "${REPO_BASE}" -maxdepth 3 -mindepth 3 -type d -not -path "${REPO_BASE}/repo-tools/*" | sed "s|${REPO_BASE}/||")
|
||||||
|
|
||||||
# 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: ")"
|
||||||
|
|
||||||
echo "$REPO_BASE/$selected"
|
echo "$REPO_BASE/$selected"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user