private.h 621 B

1234567891011121314151617181920212223242526272829
  1. #include <faux/list.h>
  2. #include <klish/ktp.h>
  3. #include <klish/ktp_session.h>
  4. #ifndef VERSION
  5. #define VERSION "1.0.0"
  6. #endif
  7. /** @brief Command line and config file options
  8. */
  9. struct options {
  10. bool_t verbose;
  11. char *unix_socket_path;
  12. bool_t stop_on_error;
  13. bool_t dry_run;
  14. bool_t quiet;
  15. faux_list_t *commands;
  16. faux_list_t *files;
  17. };
  18. // Options
  19. void help(int status, const char *argv0);
  20. struct options *opts_init(void);
  21. void opts_free(struct options *opts);
  22. int opts_parse(int argc, char *argv[], struct options *opts);
  23. // Interactive shell
  24. int klish_interactive_shell(ktp_session_t *ktp, struct options *opts);