esh_misc.h 880 B

1234567891011121314151617181920212223242526
  1. #include "esh_types.h"
  2. #ifndef ESH_MISC_H
  3. #define ESH_MISC_H
  4. #define ANSI_COLOR_RED "\x1b[31m"
  5. #define ANSI_COLOR_GREEN "\x1b[32m"
  6. #define ANSI_COLOR_YELLOW "\x1b[33m"
  7. #define ANSI_COLOR_BLUE "\x1b[34m"
  8. #define ANSI_COLOR_MAGENTA "\x1b[35m"
  9. #define ANSI_COLOR_CYAN "\x1b[36m"
  10. #define ANSI_COLOR_RESET "\x1b[0m"
  11. void EShOptimiseCurrentWorkingDirectory(); // Replaces user home folder path in esh_info_global->current_working_dir with ~
  12. void EShUpdateInviteMessage(); // Update input invite message (ex. should be called on username/cwd change)
  13. void EShShowHelpAndExit(); // Prints help to stdout and exits
  14. int EShIsShellLetter(char c); // Returns 1 if c is 'good' char (not a command char, but a written letter)
  15. ESH_JOB_DELIMITER EshIsJobDelimiter(char* c);
  16. int EShGetJobDelimiterSize(ESH_JOB_DELIMITER delim);
  17. #endif // ESH_MISC_H