Re: Environment variables in BBEdit scripts

2016-08-20 Thread Oliver Boermans
False alarm, I was running an less than current version of BBEdit (probably
a pre-release).
Variables come through fine with current release (and current pre-release).

Face palm…

On 21 August 2016 at 08:55, Oliver Boermans  wrote:

>
> On 20 August 2016 at 23:36, Christopher Stone 
> wrote:
>
>> #! /usr/bin/env bash
>> echo -e "BBEdit Environment Variables\n";
>> echo -e "
>> Doc Name: $BB_DOC_NAME
>> Doc Path: $BB_DOC_PATH
>> Doc Mode: $BB_DOC_MODE
>> Doc Language: $BB_DOC_LANGUAGE
>> Doc Sel Start: $BB_DOC_SELSTART
>> Doc Sel End: $BB_DOC_SELEND
>> Doc Sel Start Column: $BB_DOC_SELSTART_COLUMN
>> Doc Sel End Column: $BB_DOC_SELEND_COLUMN
>> Doc Sel Start Line: $BB_DOC_SELSTART_LINE
>> Doc Sel End Line: $BB_DOC_SELEND_LINE
>> " | sed -E 's! *: *! : !' | column -t -s' ';
>>
>
> Thanks Chris,
> clearly something wrong at my end, my output:
>
> BBEdit Environment Variables
>> Doc Name  :
>> Doc Path  :
>> Doc Mode  :
>> Doc Language  :
>> Doc Sel Start :
>> Doc Sel End   :
>> Doc Sel Start Column  :
>> Doc Sel End Column:
>> Doc Sel Start Line:
>> Doc Sel End Line  :
>
>
> Perhaps a job for support.
> Cheers
> Ollie
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Environment variables in BBEdit scripts

2016-08-20 Thread Oliver Boermans
On 20 August 2016 at 23:36, Christopher Stone 
wrote:

> #! /usr/bin/env bash
> echo -e "BBEdit Environment Variables\n";
> echo -e "
> Doc Name: $BB_DOC_NAME
> Doc Path: $BB_DOC_PATH
> Doc Mode: $BB_DOC_MODE
> Doc Language: $BB_DOC_LANGUAGE
> Doc Sel Start: $BB_DOC_SELSTART
> Doc Sel End: $BB_DOC_SELEND
> Doc Sel Start Column: $BB_DOC_SELSTART_COLUMN
> Doc Sel End Column: $BB_DOC_SELEND_COLUMN
> Doc Sel Start Line: $BB_DOC_SELSTART_LINE
> Doc Sel End Line: $BB_DOC_SELEND_LINE
> " | sed -E 's! *: *! : !' | column -t -s' ';
>

Thanks Chris,
clearly something wrong at my end, my output:

BBEdit Environment Variables
> Doc Name  :
> Doc Path  :
> Doc Mode  :
> Doc Language  :
> Doc Sel Start :
> Doc Sel End   :
> Doc Sel Start Column  :
> Doc Sel End Column:
> Doc Sel Start Line:
> Doc Sel End Line  :


Perhaps a job for support.
Cheers
Ollie

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Environment variables in BBEdit scripts

2016-08-20 Thread Christopher Stone
On Aug 20, 2016, at 07:24, Oliver Boermans  wrote:
> If I execute this script from the scripts menu in BBEdit:
> …
> Should I be seeing BB_DOC_NAME, BB_DOC_PATH and friends in the list that is 
> output?
> 
> I have been attempting to use these variables in a script, but they are 
> returning nothing, i.e.


Hey Oliver,

Try this:

#! /usr/bin/env bash
echo -e "BBEdit Environment Variables\n";
echo -e "
Doc Name: $BB_DOC_NAME
Doc Path: $BB_DOC_PATH
Doc Mode: $BB_DOC_MODE
Doc Language: $BB_DOC_LANGUAGE
Doc Sel Start: $BB_DOC_SELSTART
Doc Sel End: $BB_DOC_SELEND
Doc Sel Start Column: $BB_DOC_SELSTART_COLUMN
Doc Sel End Column: $BB_DOC_SELEND_COLUMN
Doc Sel Start Line: $BB_DOC_SELSTART_LINE
Doc Sel End Line: $BB_DOC_SELEND_LINE
" | sed -E 's! *: *!:   !' | column -t -s'  ';

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Environment variables in BBEdit scripts

2016-08-20 Thread Oliver Boermans
If I execute this script from the scripts menu in BBEdit:

#!/bin/sh
printenv


Should I be seeing BB_DOC_NAME, BB_DOC_PATH and friends in the list that is
output?

I have been attempting to use these variables in a script, but they are
returning nothing, i.e.

#!/bin/sh
echo $BB_DOC_NAME


What might I be missing?

Any pointers are very welcome.
Cheers
Ollie

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.