started implementing a configuration

This commit is contained in:
root committed 2026-10-06 20:49:15 +02:00
1 parent 38130ab1d9
commit 8ed2407463
5 files changed
+42 -13

No files matched your search

+16 -5
View File
@@ -18,6 +18,8 @@
#include "arguments.h"
#include "type_definitions.h"
#include "sorting.h"
#include "format.h"
#include "config.h"
// macro definitions
#define SUCCESS 0
@@ -378,11 +380,20 @@ int display_directory_contents(
tree[ 4 * recursion_level + 2 ] = '-';
tree[ 4 * recursion_level + 3 ] = ' ';
log_info(
"%s%s",
tree,
entry->name
);
fprintf( stdout, "%s", tree );
if ( entry->type == type_directory )
{
format_set_style( directory_style, DIR_STYLE_NUM );
format_set_fg_colour( directory_colour );
}
fprintf( stdout, "%s", entry->name );
if ( entry->type == type_directory )
{
format_reset_style( directory_style, DIR_STYLE_NUM );
format_clear_fg_colour();
}
fprintf( stdout, "\n" );
if ( recursion_level < args->depth
&& entry->type == type_directory )