Skip to content

Conversation

@zwily
Copy link

@zwily zwily commented Nov 13, 2011

Adds a search command to the bot that will return the last 10 lines matching
the provided string in the specified context.

This required sending the bouncer to the bot instead of the just the user,
since we needed to get more state.

Stuff to be done to make better:

  • Let users page through results
  • Let users ask for X lines of context around one of the results
  • Make searching more efficient (we normally want to search from the end of a
    backlog)
  • Colorize results

The first two items will require keeping some state around for searches
(things like last query, offsets of each result into the file, etc.)

Adds a search command to the bot that will return the last 10 lines matching
the provided string in the specified context.

This required sending the bouncer to the bot instead of the just the user,
since we needed to get more state.

Stuff to be done to make better:

 * Let users page through results
 * Let users ask for X lines of context around one of the results
 * Make searching more efficient (we normally want to search from the end of a
   backlog)
 * Colorize results

The first two items will require keeping some state around for searches
(things like last query, offsets of each result into the file, etc.)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops - security hole here. filename is built from the user-specified ctx which is not sanitized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant