mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Merge branch '2178_hardlink_highlight'
* 2178_hardlink_highlight: Changes for respect new 'HARDLINK' highlight type. Ticket #2478: HARDLINK file type
This commit is contained in:
commit
d194d2478a
@ -80,6 +80,12 @@ mc_fhl_is_link (file_entry * fe)
|
||||
return S_ISLNK (fe->st.st_mode);
|
||||
}
|
||||
|
||||
inline static gboolean
|
||||
mc_fhl_is_hlink (file_entry * fe)
|
||||
{
|
||||
return (fe->st.st_nlink > 1);
|
||||
}
|
||||
|
||||
inline static gboolean
|
||||
mc_fhl_is_link_to_dir (file_entry * fe)
|
||||
{
|
||||
@ -175,16 +181,14 @@ mc_fhl_get_color_filetype (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_ent
|
||||
my_color = TRUE;
|
||||
break;
|
||||
case MC_FLHGH_FTYPE_T_LINK:
|
||||
if (mc_fhl_is_link (fe))
|
||||
if ((mc_fhl_is_link (fe)) || (mc_fhl_is_hlink (fe)))
|
||||
my_color = TRUE;
|
||||
break;
|
||||
case MC_FLHGH_FTYPE_T_HARDLINK:
|
||||
/*TODO: hanlde it */
|
||||
if (mc_fhl_is_link (fe))
|
||||
if (mc_fhl_is_hlink (fe))
|
||||
my_color = TRUE;
|
||||
break;
|
||||
case MC_FLHGH_FTYPE_T_SYMLINK:
|
||||
/*TODO: hanlde it */
|
||||
if (mc_fhl_is_link (fe))
|
||||
my_color = TRUE;
|
||||
break;
|
||||
|
@ -4,7 +4,6 @@
|
||||
[directory]
|
||||
type=DIR
|
||||
|
||||
|
||||
[device]
|
||||
type=DEVICE
|
||||
|
||||
@ -17,6 +16,9 @@
|
||||
[symlink]
|
||||
type=SYMLINK
|
||||
|
||||
[hardlink]
|
||||
type=HARDLINK
|
||||
|
||||
[core]
|
||||
regexp=^core\\.*\\d*$
|
||||
|
||||
|
@ -58,6 +58,7 @@
|
||||
directory=white;
|
||||
executable=brightmagenta;
|
||||
symlink=lightgray;
|
||||
hardlink=
|
||||
stalelink=brightred;
|
||||
device=brightmagenta;
|
||||
special=brightblue;
|
||||
|
@ -58,6 +58,7 @@
|
||||
directory=white;
|
||||
executable=brightmagenta;
|
||||
symlink=lightgray;
|
||||
hardlink=
|
||||
stalelink=brightred;
|
||||
device=brightmagenta;
|
||||
special=brightblue;
|
||||
|
@ -59,6 +59,7 @@
|
||||
directory=white;
|
||||
executable=brightgreen;
|
||||
symlink=lightgray;
|
||||
hardlink=
|
||||
stalelink=brightred;
|
||||
device=brightmagenta;
|
||||
special=black;
|
||||
|
@ -58,6 +58,7 @@
|
||||
directory=white;
|
||||
executable=brightgreen;
|
||||
symlink=lightgray;
|
||||
hardlink=
|
||||
stalelink=brightred;
|
||||
device=brightmagenta;
|
||||
special=black;
|
||||
|
@ -60,6 +60,7 @@
|
||||
directory=white;
|
||||
executable=brightgreen;
|
||||
symlink=lightgray;
|
||||
hardlink=
|
||||
stalelink=brightred;
|
||||
device=brightmagenta;
|
||||
special=black;
|
||||
|
@ -55,6 +55,7 @@
|
||||
directory=brightcyan;
|
||||
executable=brightgreen;
|
||||
symlink=red;
|
||||
hardlink=
|
||||
stalelink=yellow;blue
|
||||
device=green;
|
||||
special=brightblue;
|
||||
|
@ -49,6 +49,7 @@
|
||||
directory=blue;
|
||||
executable=brightgreen;
|
||||
symlink=gray;
|
||||
hardlink=
|
||||
stalelink=brightred;
|
||||
device=brightmagenta;
|
||||
special=gray;
|
||||
|
@ -102,6 +102,7 @@
|
||||
directory=
|
||||
executable=rgb030
|
||||
symlink=rgb202
|
||||
hardlink=
|
||||
# 404 Not Found :)
|
||||
stalelink=rgb404
|
||||
device=rgb231
|
||||
|
@ -100,6 +100,7 @@
|
||||
directory=;;bold
|
||||
executable=color114
|
||||
symlink=color180
|
||||
hardlink=
|
||||
stalelink=rgb404
|
||||
device=rgb231
|
||||
special=rgb331
|
||||
|
@ -31,6 +31,7 @@ context default
|
||||
keyword SPECIAL brightred
|
||||
keyword STALE_LINK brightred
|
||||
keyword SYMLINK brightred
|
||||
keyword HARDLINK brightred
|
||||
|
||||
context linestart # \n brown
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user