shell_getfirst_command.c 477 B

12345678910111213141516
  1. /*
  2. * shell_getfirst_command.c
  3. */
  4. #include "private.h"
  5. /*--------------------------------------------------------- */
  6. const clish_command_t *clish_shell_getfirst_command(clish_shell_t * this,
  7. const char *line, clish_nspace_visibility_t field)
  8. {
  9. clish_shell_iterator_init(&this->context.iter, field);
  10. /* find the first command for which this is a prefix */
  11. return clish_shell_getnext_command(this, line);
  12. }
  13. /*--------------------------------------------------------- */