Re: [Help-bash] Storing cursor positions using tput into an array.
From:
Sinbad
Subject:
Re: [Help-bash] Storing cursor positions using tput into an array.
Date:
Tue, 12 Sep 2017 11:10:49 +0530
>I'd change your function to store both coordinates as "x,y".
you mean like in a dictionary. can you please give an example ?
On Mon, Sep 11, 2017 at 6:50 PM, João Eiras <address@hidden> wrote:
> > eval "$1[0]=$((${pos[0]:2} - 2))"
> > eval "$1[1]=$((${pos[1]} - 1))"}
> >
> > save_pos pos works, But i want something like save_pos pos[$index];
>
> You're trying to create an array of arrays which is not supported in
> bash. I'd change your function to store both coordinates as "x,y".
>