Closed rask24 closed 1 week ago
The changes in this pull request focus on modifying the loop
function within the loop.c
file. The primary alterations include redirecting the output of the readline function to the standard error stream and changing the method used to display the exit message. The exit message is now output using ft_putendl_fd
instead of printf
. Additionally, the builtins_echo.c
file has been updated to replace printf
calls with ft_putstr_fd
for outputting strings. These adjustments enhance output consistency while maintaining the original logic of the functions.
File | Change Summary |
---|---|
src/routine/loop.c | Redirected readline output to stderr and changed exit message handling to use ft_putendl_fd . |
src/builtins/builtins_echo.c | Replaced printf calls with ft_putstr_fd in the print_args function. |
src/builtins/builtins_env.c | Updated print_env_entry to use ft_printf instead of printf . |
src/builtins/builtins_export.c | Minor changes in comments and indentation in add_complete_env . |
src/builtins/builtins_export_utils.c | Updated print_a_export to use ft_printf and improved readability. |
include/env.h | Updated author attribution and timestamps in the header comments. |
src/utils/print_error.c | Refactored error printing functions to use ft_dprintf instead of printf . |
Objective | Addressed | Explanation |
---|---|---|
Fix minishell io stream (#143) | ✅ |
loop
function relate to the modifications in src/utils/print_error.c
, where error messages are now printed using a custom function, enhancing consistency in output handling.loop
function's output handling may connect with the changes in src/exec/execute_pipeline.c
, where the execution of commands in a pipeline is managed, potentially affecting how output is handled in the context of command execution.loop
function's control flow and output handling may relate to the modifications in src/exec/exec.c
, where command execution logic is centralized, impacting how outputs are managed during execution.loop
function may connect with the changes in src/ui/event_hook.c
, where signal handling is refined, affecting how user inputs are processed and responded to.is_empty_input
in the main PR enhances input validation, which relates to the changes in the loop
function, ensuring that inputs consisting solely of whitespace are handled correctly without causing syntax errors.loop
function align with the changes in the loop.c
, where lexer validation is enhanced to handle comments appropriately, preventing syntax errors for such inputs.🐇 In the loop where we play,
Output streams lead the way.
Errors now to stderr flow,
Exit messages in tow.
Consistency is our delight,
Hopping through code, oh what a sight! 🌟
Attention: Patch coverage is 87.50000%
with 1 line
in your changes missing coverage. Please review.
Files with missing lines | Patch % | Lines |
---|---|---|
src/builtins/builtins_env.c | 50.00% | 0 Missing and 1 partial :warning: |
@@ Coverage Diff @@
## main #180 +/- ##
==========================================
+ Coverage 74.38% 74.44% +0.06%
==========================================
Files 47 47
Lines 769 771 +2
Branches 144 144
==========================================
+ Hits 572 574 +2
Misses 172 172
Partials 25 25
Flag | Coverage Δ | |
---|---|---|
unittests | 74.44% <87.50%> (+0.06%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files with missing lines | Coverage Δ | |
---|---|---|
src/builtins/builtins_echo.c | 94.11% <100.00%> (+0.78%) |
:arrow_up: |
src/builtins/builtins_export.c | 62.16% <ø> (ø) |
|
src/builtins/builtins_export_utils.c | 100.00% <100.00%> (ø) |
|
src/builtins/builtins_env.c | 55.55% <50.00%> (ø) |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ba2c08a...39bd996. Read the comment docs.
e2e tests fail on using builtin echo
command.
fix #143
Summary by CodeRabbit
Bug Fixes
Refactor