You are not logged in.

Announcement

Due to heavy spamming of forums registration is going in stages. If you wish to register as a new user with ArchBang Forums, first register and then send an e-mail to: archbangforums at gmail dot com. It should contain the problem you want to discuss or some other AB related content. You will be promoted from registering member with no posting rights to new member with posting rights after that. If your mail is ignored you haven't fulfilled the requirements.

#1 2012-05-22 00:16:27

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,892

Bash highlighting in nano [Solved]

I have got nanorc set up for bash syntax but it only shows files that are

#!/bin/bash

It will not work with

#!/usr/bin/env bash

The syntax file shows

syntax "sh" "\.sh$"
header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"

Understand the first part '^#!' but after that I am not sure what I need to change

Wondering if anyone knows how to get it work with env bash?

Offline

#2 2012-05-22 07:45:19

oliver
Administrator
Registered: 2010-11-04
Posts: 1,544

Re: Bash highlighting in nano [Solved]

Mr Green wrote:
syntax "sh" "\.sh$"
header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"

Understand the first part '^#!' but after that I am not sure what I need to change

Wondering if anyone knows how to get it work with env bash?

Could you try dropping the /

syntax "sh" "\.sh$"
header "^#!.*(ba|k|pdk)?sh[-0-9_]*"

Hasta manana, monsieur
Were the only words that I knew for sure

Offline

#3 2012-05-22 08:31:35

Ninja-1
Member
Registered: 2012-02-01
Posts: 46
Website

Re: Bash highlighting in nano [Solved]

Check out the .nanorc's in /usr/share/nano/ too, they have one built for shell scripts already.

Offline

#4 2012-05-22 08:58:39

Mr Green
Iso Developer
Registered: 2010-11-07
Posts: 3,892

Re: Bash highlighting in nano [Solved]

@Ninja-1 no shell, bash smile

@Oliver yes that is much better smile

Offline

Board footer

Powered by FluxBB