* is not parsed correctly
pmitchev opened this issue · comments
The following code is not working:
! /usr/bin/env bash
. ticktick.sh
DATA='{"a":"*"}'
tickParse "$DATA"
echo a
It outputs ls
of the current directory. OS: MacOSX
Hah. clever clever. I bet this is just standard shell globbing. Let me
look into it now.
On 11/28/2014 04:12 AM, pmitchev wrote:
The following code is not working:
#! /usr/bin/env bash
. ticktick.sh
DATA='{"a":"*"}'
tickParse "$DATA"
echo |a|It outputs |ls| of the current directory. OS: MacOSX
—
Reply to this email directly or view it on GitHub
#36.
Ok so you are close.
There's something that needs to be documented called tickVars
that may have helped you getting here.
Basically what happens is this:
#!/bin/bash
n='*'
echo $n
The * gets replaced by the variable substitution before the globber runs. In order to print just the asterisk you'll need to encapsulate that as follows
echo "$n"
As in, this is a bash-ism and therefore not my bug.
/wipes sweat-laden forehead in relief.