fixed colours for filepath arguments

This commit is contained in:
root committed 2026-10-09 21:38:32 +02:00
1 parent d256d2b863
commit 55cb861a94
2 files changed
+13 -4

No files matched your search

+2 -2
View File
@@ -11,11 +11,11 @@ const uint32_t permission_colour = 0xD0D0D0;
#define DATE_STYLE_NUM ( ( int )1 )
const style_t date_style[ DATE_STYLE_NUM ] = { style_none };
const uint32_t date_colour = 0xBBEEEE;
const uint32_t date_colour = 0x808080;
#define USER_STYLE_NUM ( ( int )1 )
const style_t user_style[ USER_STYLE_NUM ] = { style_none };
const uint32_t user_colour = 0xEEBBEE;
const uint32_t user_colour = 0x748CE0;
#define TYPE_STYLE_NUM ( ( int )1 )
const style_t type_style[ TYPE_STYLE_NUM ] = { style_none };
+11 -2
View File
@@ -66,15 +66,24 @@ int main( int argc, char** argv )
else if ( !S_ISDIR( status.st_mode ) )
{
char* name = basename( args.path[ n ] );
directory_entry_t file =
{
.extension = strrchr( name, '.' ),
.stats = status,
.type = get_entry_type( status )
};
strncpy( file.name, name, NAME_MAX );
// TODO: fix colours
file.extension = strrchr( file.name, '.' );
if ( file.extension == file.name )
{
file.extension = NULL;
}
else if ( file.extension )
{
file.extension += 1;
}
display_entry( &file, &args );
continue;
}