You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

NAME
cli - Command line interface configuration tool

SYNOPSIS
cli

DESCRIPTION
Command line interface configuration tool allowing the user to quickly change the behavior of the command line interface between 'fluid', 'shell' and 'SQL modes. If mode is not specified, the current mode remains unchanged.

SQL Mode
The SQL mode assumes everything typed within it is an SQL statement and places all content in the sqlbuffer. It will send queries to a connected server when it encounters a trailing / or @. It will also send statements
to the server If it encounters a carriage return and then go or GO. Its prompt displays the current database username and registered server name from its connection properties and sequentially numbers lines with each
carriage return until a statement or FluidShell command is executed. When a statement executes the sequential numbering next to the prompt resets to 1. SQL mode will evaluate a line to be a comment with a leading
# that is not followed by a character that is a letter or digit. This allows the use of # to handle temp table references like #temptable.
sa:[SQL Server 2012 - 80]:1> select top 3 * from Orders
sa:[SQL Server 2012 - 80]:2> go >>exported_data.csv

Shell Mode
The shell mode operates like a standard operating system shell and does not require the use of a preceding \ for FluidShell commands. Its prompt is the current operating system user and working directory appended
with a $

To send SQL statements to a connected server requires those statements to be preceded by a ; The shell mode will evaluate a line to be a comment with a leading #.
Administrator:C:\Documents and Settings\Administrator$ ;select top 3 * from Orders
Administrator:C:\Documents and Settings\Administrator$ go >>exported_data.csv

Fluid Mode
The fluid mode operates like a standard operating system shell, but it also understands SQL statements explicitly. Its prompt is the current working directory appended with a $ followed by : and a line number based on what
is stored in the SQL buffer.
C:\Documents and Settings\Administrator$:2> select top 3 * from Orders
C:\Documents and Settings\Administrator$:3> go >>exported_data.csv

OPTIONS
sql
Change the command line interface behavior to [sql] mode.

shell
Change the command line interface behavior to [shell] mode.

fluid
Change the command line interface behavior to [fluid] mode.

-ae BOOLEAN
Indicate whether alias expansion is to be performed.

-as BOOLEAN
Indicate whether a '@' character at the end of a line will trigger a SQL buffer execution.

-ec STRING
Define the character used to indicate an explicit shell command request.

-enf BOOLEAN
Indicate whether an explicit shell command request for an unknown command creates a shell exception.

-es STRING
Define the character used to indicate an explicit SQL buffer request.

-fs BOOLEAN
Indicate whether a '/' character at the end of a line will trigger a SQL buffer execution.

-ib {error, sql}
Indicate the implied request in case no other evaluation has been successful.

-p STRING
Set the PROMPT variable.

-ss BOOLEAN
Indicate whether a ';' character at the end of a line will trigger a SQL buffer execution.

-vc {off, shell, sql}
Indicate whether a leading '#' is evaluated as a comment line.

-vec BOOLEAN
Indicate whether an explicit shell command character is to be evaluated to determine a shell command request.

-ves BOOLEAN
Indicate whether an explicit SQL character is to be evaluated to determine a SQL buffer request.

-vh BOOLEAN
Indicate whether history command expansion is to be performed.

-vic BOOLEAN
Indicate whether an implicit shell command request is to be evaluated.

See the CLI section of Common Aliases and Variables page for more on how to alter the modes. Executing the export command will display all of the settings for your current mode.

See BOOLEAN VALUES section below for supported BOOLEAN values.

BOOLEAN VALUES
The following are supported BOOLEAN values: 'true', 'false', 'yes', 'no', 'y', 'n', 'on', 'off', '1', '0'.

EXAMPLES
To use the SQL mode:
cli sql
      To use the shell mode:
cli shell
      To use the fluid mode:
cli fluid




  • No labels