brandon1024 / gitchat

:speech_balloon: A Git-Based Command-Line Messaging Application
5 stars 0 forks source link

Various Improvements #51

Closed brandon1024 closed 4 years ago

brandon1024 commented 4 years ago

Improvements to Integration Test Runner

The integration test runner now accepts -h|--help which displays usage information.

Improvements to git-chat-init

Various refactors and improvements to make the code more maintainable.

Fixes and Improvements to Paging API

The paging_stop function did not correctly restore stdout and stderr streams. This was corrected.

Also introduced a pager_kill() function that will terminate the child process. Useful when an exceptional state is encountered.

Various Refactors and Improvements

Create str_array_reverse() Function

Created a function that can be used to reverse the entries in an str-array. Also created integration tests to cover this functionality.

parse-options bug fix

The parse-options API did not correctly display usage information for the OPTION_STRING_LIST_T option type. This has been corrected.

Improvements to utils

The BUG/WARN/DIE/FATAL functions were updated to prefix each line with the prefix (warn:, fatal:, etc.) rather than just the first line.

Implemented a Simple API for Paging Output

Created a new utility that can be used to display paged output through a paging application (like less, more, or in dire cases, cat) configured by the user.

run-command fixes

The run-command start_command() function had a bug that prevented arguments from being passed to /bin/sh when the use_shell flag was enabled. This has been corrected.

Improvements to strbuf API

Added a new strbuf_attach_vfmt() function that accepts a va_list. This is particularly useful for any function that wants to format a string with arguments passed through a va_list.