file-browser: identify Python scripts

This commit is contained in:
K. Lange 2019-01-12 14:07:20 +09:00
parent 95e6706fed
commit 3077e0d2b8
2 changed files with 9 additions and 0 deletions

View File

@ -636,6 +636,15 @@ static void load_directory(const char * path, int modifies_history) {
} else {
sprintf(f->filetype, "Shell Script");
}
} else if (has_extension(f, ".py")) {
sprintf(f->icon, "py");
if (statbuf.st_mode & 0111) {
/* Make executable */
sprintf(f->launcher, "SELF");
sprintf(f->filetype, "Executable Python Script");
} else {
sprintf(f->filetype, "Python Script");
}
} else if (has_extension(f, ".ko")) {
sprintf(f->icon, "file");
sprintf(f->filetype, "Kernel Module");

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB