shell_getfirst_command.c 506 B

123456789101112131415161718
  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,
  8. clish_nspace_visibility_t
  9. field)
  10. {
  11. clish_shell_iterator_init(&this->context.iter, field);
  12. /* find the first command for which this is a prefix */
  13. return clish_shell_getnext_command(this, line);
  14. }
  15. /*--------------------------------------------------------- */