antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

Add auto splitting of command line arguments. #123

Closed sowmiyamuthuraman closed 2 years ago

sowmiyamuthuraman commented 4 years ago

Fix #119

antonmedv commented 4 years ago

What about fx ‘.map(...) .field’?

sowmiyamuthuraman commented 4 years ago

What about fx ‘.map(...) .field’?

will look into this!

antonmedv commented 4 years ago

And what about this?) @ + 1

sowmiyamuthuraman commented 4 years ago

@antonmedv i am trying with this approach if (/(\)|\})\s/g.test(args[0])) { args = args[0].trim().replace(/(\(|\{).*?(\)|\})/g, function(string) { return string.replace(/\s/g, 'SPACE') }).split(' ').slice(0) for(var i=0; i<args.length; i++){ args[i]= args[i].split('SPACE').join(' '); } } is this a right way?

antonmedv commented 4 years ago

Also notes also a strings fx .foo[“some calue”].

I was trying to implement it my self. Be creating parser for js. But have not time enough.

antonmedv commented 2 years ago

I rewrote the entire fx in golang. So I belove this PR is no longer actual.