Skip to content

Commit

Permalink
make autocaptialization experimental and turn off by default
Browse files Browse the repository at this point in the history
  • Loading branch information
chaudum committed Feb 27, 2017
1 parent b5e1869 commit 4774fa3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ Changes for crash
Unreleased
==========

- Expanded the list of keywords used by autocompletion and
- Expanded the list of keywords used by autocompletion and
autocapitlization.

- Automatically capitalize keywords while typing,
e.g. ``select`` -> ``SELECT``
- Automatically capitalize keywords while typing, e.g. ``select`` -> ``SELECT``
**This feature is experimental and turned off by default. It may be removed
in future versions!**

- Automatically suggest and complete to ``UPPERCASE`` keywords
when using autocomplete.
Expand Down
5 changes: 3 additions & 2 deletions docs/cli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ The ``crash`` binary supports several command line arguments.
| | overlay for suggestions. |
| | Disabling autocomplete removes this limitation. |
+---------------------------------------+--------------------------------------------------+
| ``-C`` , ``--no-autocapitalize`` | Disable automatic capitalization of SQL keywords |
| | while typing. |
| ``-c`` , ``--autocapitalize`` | Enable automatic capitalization of SQL keywords |
| | while typing. This feature is experimental and |
| | may be removed in future versions. |
+---------------------------------------+--------------------------------------------------+

Example Usage
Expand Down
6 changes: 3 additions & 3 deletions src/crate/crash/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ def _conf_or_default(key, value):
dest='autocomplete',
default=_conf_or_default('autocomplete', True),
help='use -A to disable SQL autocompletion')
parser.add_argument('-C', '--no-autocapitalize', action='store_false',
parser.add_argument('-a', '--autocapitalize', action='store_true',
dest='autocapitalize',
default=_conf_or_default('autocapitalize', True),
help='use -C to disable automatic capitalization of SQL keywords')
default=False,
help='use -a to enable experimental auto-capitalization of SQL keywords')

parser.add_argument('--history', type=str,
help='the history file to use', default=HISTORY_PATH)
Expand Down

0 comments on commit 4774fa3

Please sign in to comment.