Add *.ash and *.bash as filetype entensions for filetype SH.

Add ash and wish to the shebang patterns.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1571 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2007-05-25 13:08:17 +00:00
parent a849585ac1
commit db9271df29
4 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2007-05-25 Enrico Tröger <enrico.troeger@uvena.de>
* data/filetype_extensions.conf, src/filetypes.c, tagmanager/sh.c:
Add *.ash and *.bash as filetype entensions for filetype SH.
Add ash and wish to the shebang patterns.
2007-05-25 Nick Treleaven <nick.treleaven@btinternet.com> 2007-05-25 Nick Treleaven <nick.treleaven@btinternet.com>
* doc/geany.docbook: * doc/geany.docbook:

View File

@ -18,7 +18,7 @@ Ruby=*.rb;*.rhtml;*.ruby;
Tcl=*.tcl;*.tk;*.wish; Tcl=*.tcl;*.tk;*.wish;
Lua=*.lua; Lua=*.lua;
Ferite=*.fe; Ferite=*.fe;
Sh=*.sh;configure;configure.in;configure.in.in;configure.ac;*.ksh;*.zsh; Sh=*.sh;configure;configure.in;configure.in.in;configure.ac;*.ksh;*.zsh;*.ash;*.bash;
Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*; Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*;
XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd; XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;
Docbook=*.docbook; Docbook=*.docbook;

View File

@ -367,7 +367,7 @@ void filetypes_init_types()
filetypes[GEANY_FILETYPES_SH]->title = g_strdup(_("Shell script file")); filetypes[GEANY_FILETYPES_SH]->title = g_strdup(_("Shell script file"));
filetypes[GEANY_FILETYPES_SH]->extension = g_strdup("sh"); filetypes[GEANY_FILETYPES_SH]->extension = g_strdup("sh");
filetypes[GEANY_FILETYPES_SH]->pattern = utils_strv_new("*.sh", "configure", "configure.in", filetypes[GEANY_FILETYPES_SH]->pattern = utils_strv_new("*.sh", "configure", "configure.in",
"configure.in.in", "configure.ac", "*.ksh", "*.zsh", NULL); "configure.in.in", "configure.ac", "*.ksh", "*.zsh", "*.ash", "*.bash", NULL);
filetypes[GEANY_FILETYPES_SH]->style_func_ptr = styleset_sh; filetypes[GEANY_FILETYPES_SH]->style_func_ptr = styleset_sh;
filetypes[GEANY_FILETYPES_SH]->comment_open = g_strdup("#"); filetypes[GEANY_FILETYPES_SH]->comment_open = g_strdup("#");
filetypes[GEANY_FILETYPES_SH]->comment_close = NULL; filetypes[GEANY_FILETYPES_SH]->comment_close = NULL;
@ -599,8 +599,12 @@ static filetype *find_shebang(gint idx)
ft = filetypes[GEANY_FILETYPES_SH]; ft = filetypes[GEANY_FILETYPES_SH];
else if (strncmp(basename_interpreter, "csh", 3) == 0) else if (strncmp(basename_interpreter, "csh", 3) == 0)
ft = filetypes[GEANY_FILETYPES_SH]; ft = filetypes[GEANY_FILETYPES_SH];
else if (strncmp(basename_interpreter, "ash", 3) == 0)
ft = filetypes[GEANY_FILETYPES_SH];
else if (strncmp(basename_interpreter, "dmd", 3) == 0) else if (strncmp(basename_interpreter, "dmd", 3) == 0)
ft = filetypes[GEANY_FILETYPES_D]; ft = filetypes[GEANY_FILETYPES_D];
else if (strncmp(basename_interpreter, "wish", 4) == 0)
ft = filetypes[GEANY_FILETYPES_TCL];
// what else to add? // what else to add?
g_free(basename_interpreter); g_free(basename_interpreter);

View File

@ -101,7 +101,7 @@ static void findShTags (void)
extern parserDefinition* ShParser (void) extern parserDefinition* ShParser (void)
{ {
static const char *const extensions [] = { static const char *const extensions [] = {
"sh", "SH", "bsh", "bash", "ksh", "zsh", NULL "sh", "SH", "bsh", "bash", "ksh", "zsh", "ash", NULL
}; };
parserDefinition* def = parserNew ("Sh"); parserDefinition* def = parserNew ("Sh");
def->kinds = ShKinds; def->kinds = ShKinds;