qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] qemu-iotests: remove bash shebang from library files


From: Cleber Rosa
Subject: Re: [PATCH 1/4] qemu-iotests: remove bash shebang from library files
Date: Wed, 9 Oct 2019 14:38:43 -0400
User-agent: Mutt/1.12.1 (2019-06-15)

On Wed, Oct 09, 2019 at 12:26:27PM -0400, Cleber Rosa wrote:
> On Fri, Sep 27, 2019 at 11:37:52AM -0500, Eric Blake wrote:
> > On 9/27/19 9:17 AM, Cleber Rosa wrote:
> > > Due to not being able to find a reason to have shebangs on files that
> > > are not executable.
> > > 
> > > Signed-off-by: Cleber Rosa <address@hidden>
> > > ---
> > >   tests/qemu-iotests/common.config  | 2 --
> > >   tests/qemu-iotests/common.filter  | 2 --
> > >   tests/qemu-iotests/common.nbd     | 1 -
> > >   tests/qemu-iotests/common.pattern | 2 --
> > >   tests/qemu-iotests/common.qemu    | 2 --
> > >   tests/qemu-iotests/common.rc      | 2 --
> > >   tests/qemu-iotests/common.tls     | 2 --
> > >   7 files changed, 13 deletions(-)
> > > 
> > 
> > Loss of the shebang changes the mode in which emacs opens the files (from
> > Shell-script[bash] to Conf[space] in my case).  I agree that a #! comment is
> > not appropriate for a file that is not executable as a standalone file, but
> > it becomes harder to edit the file correctly unless we replace it with some
> > other way of letting editors realize that the contents of each file is still
> > meant to be consumed by bash.
> > 
> > Something like this would work:
> > 
> > # hey emacs, this file will be sourced by bash: -*- sh -*-
> >
> 
> Yes, good point.  Will send that on a v2.
>

BTW, in addition to that, we may add to .editorconfig something like:

[tests/qemu-iotests/common.*]
indent_style = space
indent_size = 4
file_type_emacs = sh

Although I was expecting editorconfig to provide a mode hint for other
editors, which doesn't seem to be the case.

Cheers,
- Cleber.

> - Cleber.
> 
> > -- 
> > Eric Blake, Principal Software Engineer
> > Red Hat, Inc.           +1-919-301-3226
> > Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]