Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

automatically select output format when terminal is interactive or not #86

Merged
merged 2 commits into from
Apr 24, 2017

Conversation

spacecowboy
Copy link
Contributor

New help text (note --format):

usage: cypher-shell [-h] [-a ADDRESS] [-u USERNAME] [-p PASSWORD]
                    [--encryption {true,false}]
                    [--format {auto,verbose,plain}] [--debug]
                    [--non-interactive] [-v] [--fail-fast | --fail-at-end]
                    [cypher]

A command line shell where  you  can  execute  Cypher  against an instance of
Neo4j. By default the shell is interactive  but  you can use it for scripting
by passing cypher directly on  the  command  line  or  by  piping a file with
cypher statements (requires Powershell on Windows).

example of piping a file:
  cat some-cypher.txt | cypher-shell

positional arguments:
  cypher                 an optional string  of  cypher  to  execute and then
                         exit

optional arguments:
  -h, --help             show this help message and exit
  --fail-fast            exit and report failure on  first error when reading
                         from file (this is the default behavior)
  --fail-at-end          exit and  report  failures  at  end  of  input  when
                         reading from file
  --format {auto,verbose,plain}
                         desired output format,  verbose  displays results in
                         tabular  format   and   prints   statistics,   plain
                         displays  data  with  minimal  formatting  (default:
                         auto)
  --debug                print additional debug information (default: false)
  --non-interactive      force non-interactive  mode,  only  useful  if auto-
                         detection fails (like on Windows) (default: false)
  -v, --version          print version  of  cypher-shell  and  exit (default:
                         false)

connection arguments:
  -a ADDRESS, --address ADDRESS
                         address and  port  to  connect  to  (default:  bolt:
                         //localhost:7687)
  -u USERNAME, --username USERNAME
                         username to connect as. Can  also be specified using
                         environment variable NEO4J_USERNAME (default: )
  -p PASSWORD, --password PASSWORD
                         password to  connect  with.  Can  also  be specified
                         using environment variable  NEO4J_PASSWORD (default:
                         )
  --encryption {true,false}
                         whether  the   connection   to   Neo4j   should   be
                         encrypted;   must   be   consistent   with   Neo4j's
                         configuration (default: true)

New help text (note `--format`):

```
usage: cypher-shell [-h] [-a ADDRESS] [-u USERNAME] [-p PASSWORD]
                    [--encryption {true,false}]
                    [--format {auto,verbose,plain}] [--debug]
                    [--non-interactive] [-v] [--fail-fast | --fail-at-end]
                    [cypher]

A command line shell where  you  can  execute  Cypher  against an instance of
Neo4j. By default the shell is interactive  but  you can use it for scripting
by passing cypher directly on  the  command  line  or  by  piping a file with
cypher statements (requires Powershell on Windows).

example of piping a file:
  cat some-cypher.txt | cypher-shell

positional arguments:
  cypher                 an optional string  of  cypher  to  execute and then
                         exit

optional arguments:
  -h, --help             show this help message and exit
  --fail-fast            exit and report failure on  first error when reading
                         from file (this is the default behavior)
  --fail-at-end          exit and  report  failures  at  end  of  input  when
                         reading from file
  --format {auto,verbose,plain}
                         desired output format,  verbose  displays results in
                         tabular  format   and   prints   statistics,   plain
                         displays  data  with  minimal  formatting  (default:
                         auto)
  --debug                print additional debug information (default: false)
  --non-interactive      force non-interactive  mode,  only  useful  if auto-
                         detection fails (like on Windows) (default: false)
  -v, --version          print version  of  cypher-shell  and  exit (default:
                         false)

connection arguments:
  -a ADDRESS, --address ADDRESS
                         address and  port  to  connect  to  (default:  bolt:
                         //localhost:7687)
  -u USERNAME, --username USERNAME
                         username to connect as. Can  also be specified using
                         environment variable NEO4J_USERNAME (default: )
  -p PASSWORD, --password PASSWORD
                         password to  connect  with.  Can  also  be specified
                         using environment variable  NEO4J_PASSWORD (default:
                         )
  --encryption {true,false}
                         whether  the   connection   to   Neo4j   should   be
                         encrypted;   must   be   consistent   with   Neo4j's
                         configuration (default: true)
```
@spacecowboy spacecowboy merged commit d862f94 into neo4j:master Apr 24, 2017
@spacecowboy spacecowboy deleted the default_plain branch April 24, 2017 10:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants