From db9271df29c0ae770e1638fe499b7d7e75b71fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 25 May 2007 13:08:17 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ data/filetype_extensions.conf | 2 +- src/filetypes.c | 6 +++++- tagmanager/sh.c | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04d10112..32af2e82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-05-25 Enrico Tröger + + * 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 * doc/geany.docbook: diff --git a/data/filetype_extensions.conf b/data/filetype_extensions.conf index cb196773..91eba476 100644 --- a/data/filetype_extensions.conf +++ b/data/filetype_extensions.conf @@ -18,7 +18,7 @@ Ruby=*.rb;*.rhtml;*.ruby; Tcl=*.tcl;*.tk;*.wish; Lua=*.lua; 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.*; XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd; Docbook=*.docbook; diff --git a/src/filetypes.c b/src/filetypes.c index 32f0703a..dcb992f2 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -367,7 +367,7 @@ void filetypes_init_types() filetypes[GEANY_FILETYPES_SH]->title = g_strdup(_("Shell script file")); filetypes[GEANY_FILETYPES_SH]->extension = g_strdup("sh"); 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]->comment_open = g_strdup("#"); filetypes[GEANY_FILETYPES_SH]->comment_close = NULL; @@ -599,8 +599,12 @@ static filetype *find_shebang(gint idx) ft = filetypes[GEANY_FILETYPES_SH]; else if (strncmp(basename_interpreter, "csh", 3) == 0) 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) ft = filetypes[GEANY_FILETYPES_D]; + else if (strncmp(basename_interpreter, "wish", 4) == 0) + ft = filetypes[GEANY_FILETYPES_TCL]; // what else to add? g_free(basename_interpreter); diff --git a/tagmanager/sh.c b/tagmanager/sh.c index a464c14a..f2af2c4b 100644 --- a/tagmanager/sh.c +++ b/tagmanager/sh.c @@ -101,7 +101,7 @@ static void findShTags (void) extern parserDefinition* ShParser (void) { static const char *const extensions [] = { - "sh", "SH", "bsh", "bash", "ksh", "zsh", NULL + "sh", "SH", "bsh", "bash", "ksh", "zsh", "ash", NULL }; parserDefinition* def = parserNew ("Sh"); def->kinds = ShKinds;