Skip to content

Instantly share code, notes, and snippets.

@knorth55
Last active October 22, 2016 14:18
Show Gist options
  • Save knorth55/f6e59bc1b3d1379b1fdde4792f1725f0 to your computer and use it in GitHub Desktop.
Save knorth55/f6e59bc1b3d1379b1fdde4792f1725f0 to your computer and use it in GitHub Desktop.
percol-search-travis-history() {
if [ "$READLINE_LINE" = "travis logs " ]; then
local l=$(travis history --limit 20 | percol | sed -e "s/#\([0-9]\+\).*/\1/g")
READLINE_LINE="$READLINE_LINE$l"
READLINE_POINT=${#READLINE_LINE}
elif [ "$READLINE_LINE" = "travis open " ]; then
local l=$(travis history --limit 20 | percol | sed -e "s/#\([0-9]\+\).*/\1/g")
READLINE_LINE="$READLINE_LINE$l"
READLINE_POINT=${#READLINE_LINE}
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment