GNU bug report logs -
#17333
sh-mode: File local variables for setting shell variant
Previous Next
Reported by: Ben Finney <ben+gnu <at> benfinney.id.au>
Date: Thu, 24 Apr 2014 00:59:03 UTC
Severity: normal
Tags: confirmed
Found in version 24.3.1
Fixed in version 25.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 17333 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 29-Apr-2014, Glenn Morris wrote:
> Ben Finney wrote:
>
> > The 'sh-mode' appears to have no means for allowing a
> > non-executable file to declare, in its local variables, the shell
> > variant to use for syntax.
>
> I'd also like a way to do this.
> In the past I've used
>
> -*- mode: sh; eval: (sh-set-shell "tcsh" nil nil) -*-
>
> but it is not great.
Partly because, AIUI, having ‘eval’ in the file's local variables is a
security hole, and is often disabled.
> Ideas that come to mind are a bunch of aliases (sh-bash-mode etc) that
> DTRT (yuck?); or sh-mode could add something to
> hack-local-variables-hook that respects a file-local `sh-buffer-shell'
> or somesuch.
I'd expect to be able to set the shell variant similar to the way that
I can set the SQL dialect::
# Local variables:
# coding: utf-8
# mode: sql
# sql-product: postgres
# End:
So, for example::
# Local variables:
# coding: utf-8
# mode: sh
# shell-variant: bash
# End:
would be a good interface for this feature, IMO.
--
\ “I went to the cinema, it said ‘Adults: $5.00, Children $2.50’. |
`\ So I said ‘Give me two boys and a girl.’” —Steven Wright |
_o__) |
Ben Finney <ben <at> benfinney.id.au>
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 10 years and 234 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.