universal-ctags / citre

A superior code reading & auto-completion tool with pluggable backends.
GNU General Public License v3.0
337 stars 26 forks source link

C: sort header with directory components #52

Closed masatake closed 3 years ago

masatake commented 3 years ago

Doing M-. at "module.h" on the line:

   #include <linux/module.h>

shows the list

/home/jet/var/linux/arch/x86/include/asm/module.h
1: (F)
/home/jet/var/linux/arch/x86/um/asm/module.h
1: (F)
/home/jet/var/linux/include/asm-generic/module.h
1: (F)
/home/jet/var/linux/include/linux/greybus/module.h
1: (F)
/home/jet/var/linux/include/linux/module.h
1: (F)
/home/jet/var/linux/include/trace/events/module.h
1: (F)
/home/jet/var/linux/include/uapi/linux/module.h
1: (F)

Header files having linux/module.h as part of their names should have higher priorities in the list.

With this change, the list becomes:

/home/jet/var/linux/include/linux/module.h
1: (F)
/home/jet/var/linux/include/uapi/linux/module.h
1: (F)
/home/jet/var/linux/arch/x86/include/asm/module.h
1: (F)
/home/jet/var/linux/arch/x86/um/asm/module.h
1: (F)
/home/jet/var/linux/include/asm-generic/module.h
1: (F)
/home/jet/var/linux/include/linux/greybus/module.h
1: (F)
/home/jet/var/linux/include/trace/events/module.h
1: (F)
masatake commented 3 years ago

Thank you for reviewing. I will revise my change.

AmaiKinono commented 3 years ago

Thanks for contributing!