FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-30-2011, 03:44 AM
Dave Reisner
 
Default makepkg: fix vim syntax highlighting

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
scripts/makepkg.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c988554..b7246f1 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1134,7 +1134,7 @@ create_package() {

# check for changelog/install files
for i in 'changelog/.CHANGELOG' 'install/.INSTALL'; do
- IFS='/' read -r orig dest <<< "$i"
+ IFS='/' read -r orig dest < <(printf '%s
' "$i")

if [[ -n ${!orig} ]]; then
msg2 "$(gettext "Adding %s file...")" "$orig"
--
1.7.6
 
Old 06-30-2011, 04:15 AM
Florian Pritz
 
Default makepkg: fix vim syntax highlighting

> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index c988554..b7246f1 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1134,7 +1134,7 @@ create_package() {
>*
>* *** # check for changelog/install files
>* *** for i in 'changelog/.CHANGELOG' 'install/.INSTALL'; do
> -*** *** IFS='/' read -r orig dest <<< "$i"
> +*** *** IFS='/' read -r orig dest < <(printf '%s
' "$i")
>*
>* *** *** if [[ -n ${!orig} ]]; then
>* *** *** *** msg2 "$(gettext "Adding %s file...")" "$orig"
> --
> 1.7.6

I think adding set ft=bash to the modeline should be enough, but I can't test that right now.
 
Old 06-30-2011, 04:27 AM
Dave Reisner
 
Default makepkg: fix vim syntax highlighting

On Thu, Jun 30, 2011 at 06:15:23AM +0200, Florian Pritz wrote:
> > diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> > index c988554..b7246f1 100644
> > --- a/scripts/makepkg.sh.in
> > +++ b/scripts/makepkg.sh.in
> > @@ -1134,7 +1134,7 @@ create_package() {
> >*
> >* *** # check for changelog/install files
> >* *** for i in 'changelog/.CHANGELOG' 'install/.INSTALL'; do
> > -*** *** IFS='/' read -r orig dest <<< "$i"
> > +*** *** IFS='/' read -r orig dest < <(printf '%s
' "$i")
> >*
> >* *** *** if [[ -n ${!orig} ]]; then
> >* *** *** *** msg2 "$(gettext "Adding %s file...")" "$orig"
> > --
> > 1.7.6
>
> I think adding set ft=bash to the modeline should be enough, but I can't test that right now.
>

Would be lovely if such a thing existed. vim uses a singular ft=sh and
detects further capabilities based on the shebang. It's not an exact
science and the syntax file doesn't have support for some the newer
bash4 features, such as ${var,,} or ${var^^}. Still, here strings are
old (2.0.5), so I'm not sure why this breaks it.

d
 

Thread Tools




All times are GMT. The time now is 03:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org