Re: [dev] snotes v0.9 - a simple notes system

From: v4hn <>
Date: Mon, 4 Feb 2013 14:18:01 +0100

Hey everyone,

thanks for the suggestions, I've just included all of them.

On Mon, Feb 04, 2013 at 05:09:48PM +0800, Chris Down wrote:
> Since this issue cropped up I figured I might as well take a quick look at
> the script. There are two other things that might be worth changing after a
> quick skim:
> - Not sure what's up with all the ''[ -n "`which foo`" ]'' idioms. Use
> ''type'' and just check the exit code.

funny thing: the type statement is actually longer because type does not
support -q and the usual >/dev/nul... line adds characters.
But sure, you're right.

> - Instead of escaping in heredocs, you can just use 'EOF' instead of EOF.

Thanks! I wrote this introduction last night at 4am and was too tired to look
up the right escaping for heredocs.

> On 4 February 2013 17:04, Chris Down <> wrote:
> > On 4 February 2013 16:56, Thomas Dean <> wrote:
> > > One thing to mention: sh links to dash in my case, which has no built-in
> > > "source" command. Is there a standalone substitute?
> >
> > Use ''.'' instead of ''source'', it's POSIX.

I consider ``source'' more readable than ``.'' but given that the first
is less portable I changed it.

Is the rest of the code dash-friendly? Because I normally don't care about
debian & friends.


Received on Mon Feb 04 2013 - 14:18:01 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 04 2013 - 14:24:05 CET