GQL icon indicating copy to clipboard operation
GQL copied to clipboard

EOF/script input, default repo, and plain-text output

Open jhheider opened this issue 7 months ago • 7 comments

Very cool project. Three features I could see being immediately useful:

  • EOF support for piped input; currently echo SELECT 1 | gitql -r . goes into a loop redisplaying its prompt forever. echo 'SELECT 1\nexit' | gitql -r . works
  • script file support; echo SELECT 1 >foo.sql; gitql -r . foo.sql would be useful.
  • default repo: echo SELECT 1\\nexit | gitql should probably look for the repo in . (and possibly walk up .. until it finds a .git or hits /).
  • plain-text, csv, or json output: gitql -r . foo.sql --csv would be very useful in pipelines to work with the resultant data without the ascii tables.

I may work on some PRs for some of these as time permits (assuming they're not against some philosophy of the project). This is a very cool idea, and these would address a wider range of use cases.

jhheider avatar Nov 27 '23 18:11 jhheider