Skip to content

Commit 41019de

Browse files
committed
Removed dash from 'tab complete' string
1 parent c3e3c1c commit 41019de

14 files changed

+57
-57
lines changed

CHANGELOG.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## 0.10.0 (February 7, 2020)
1010
* Enhancements
1111
* Changed the default help text to make `help -v` more discoverable
12-
* **set** command now supports tab-completion of values
12+
* **set** command now supports tab completion of values
1313
* Added `add_settable()` and `remove_settable()` convenience methods to update `self.settable` dictionary
1414
* Added convenience `ansi.fg` and `ansi.bg` enums of foreground and background colors
1515
* `ansi.style()` `fg` argument can now either be of type `str` or `ansi.fg`
@@ -185,7 +185,7 @@
185185
`delimiter_complete`, `flag_based_complete`, `index_based_complete`, `path_complete`, `shell_cmd_complete`
186186
* Renamed history option from `--output-file` to `--output_file`
187187
* Renamed `matches_sort_key` to `default_sort_key`. This value determines the default sort ordering of string
188-
results like alias, command, category, macro, settable, and shortcut names. Unsorted tab-completion results
188+
results like alias, command, category, macro, settable, and shortcut names. Unsorted tab completion results
189189
also are sorted with this key. Its default value (ALPHABETICAL_SORT_KEY) performs a case-insensitive alphabetical
190190
sort, but it can be changed to a natural sort by setting the value to NATURAL_SORT_KEY.
191191
* `StatementParser` now expects shortcuts to be passed in as dictionary. This eliminates the step of converting the
@@ -434,7 +434,7 @@
434434
* ``ACHelpFormatter`` now inherits from ``argparse.RawTextHelpFormatter`` to make it easier
435435
for formatting help/description text
436436
* Aliases are now sorted alphabetically
437-
* The **set** command now tab-completes settable parameter names
437+
* The **set** command now tab completes settable parameter names
438438
* Added ``async_alert``, ``async_update_prompt``, and ``set_window_title`` functions
439439
* These allow you to provide feedback to the user in an asychronous fashion, meaning alerts can
440440
display when the user is still entering text at the prompt. See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py)
@@ -468,7 +468,7 @@
468468
* Improved implementation of lifecycle hooks to support a plugin
469469
framework, see ``docs/hooks.rst`` for details.
470470
* New dependency on ``attrs`` third party module
471-
* Added ``matches_sorted`` member to support custom sorting of tab-completion matches
471+
* Added ``matches_sorted`` member to support custom sorting of tab completion matches
472472
* Added [tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocomp_dynamic.py) example
473473
* Demonstrates updating the argparse object during init instead of during class construction
474474
* Deprecations
@@ -498,7 +498,7 @@
498498
* Bug Fixes
499499
* Fixed issue where piping and redirecting did not work correctly with paths that had spaces
500500
* Enhancements
501-
* Added ability to print a header above tab-completion suggestions using `completion_header` member
501+
* Added ability to print a header above tab completion suggestions using `completion_header` member
502502
* Added ``pager`` and ``pager_chop`` attributes to the ``cmd2.Cmd`` class
503503
* ``pager`` defaults to **less -RXF** on POSIX and **more** on Windows
504504
* ``pager_chop`` defaults to **less -SRXF** on POSIX and **more** on Windows
@@ -570,7 +570,7 @@
570570
* Fixed ``AttributeError`` on Windows when running a ``select`` command cause by **pyreadline** not implementing ``remove_history_item``
571571
* Enhancements
572572
* Added warning about **libedit** variant of **readline** not being supported on macOS
573-
* Added tab-completion of alias names in value field of **alias** command
573+
* Added tab completion of alias names in value field of **alias** command
574574
* Enhanced the ``py`` console in the following ways
575575
* Added tab completion of Python identifiers instead of **cmd2** commands
576576
* Separated the ``py`` console history from the **cmd2** history
@@ -628,7 +628,7 @@
628628
## 0.8.2 (March 21, 2018)
629629

630630
* Bug Fixes
631-
* Fixed a bug in tab-completion of command names within sub-menus
631+
* Fixed a bug in tab completion of command names within sub-menus
632632
* Fixed a bug when using persistent readline history in Python 2.7
633633
* Fixed a bug where the ``AddSubmenu`` decorator didn't work with a default value for ``shared_attributes``
634634
* Added a check to ``ppaged()`` to only use a pager when running in a real fully functional terminal
@@ -685,7 +685,7 @@
685685
and [arg_print.py](https://github.com/python-cmd2/cmd2/blob/master/examples/arg_print.py) examples
686686
* Added support for Argparse subcommands when using the **with_argument_parser** or **with_argparser_and_unknown_args** decorators
687687
* See [subcommands.py](https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py) for an example of how to use subcommands
688-
* Tab-completion of subcommand names is automatically supported
688+
* Tab completion of subcommand names is automatically supported
689689
* The **__relative_load** command is now hidden from the help menu by default
690690
* This command is not intended to be called from the command line, only from within scripts
691691
* The **set** command now has an additional **-a/--all** option to also display read-only settings
@@ -712,7 +712,7 @@
712712
* Fixed a couple broken examples
713713
* Enhancements
714714
* Improved documentation for modifying shortcuts (command aliases)
715-
* Made ``pyreadline`` a dependency on Windows to ensure tab-completion works
715+
* Made ``pyreadline`` a dependency on Windows to ensure tab completion works
716716
* Other changes
717717
* Abandoned official support for Python 3.3. It should still work, just don't have an easy way to test it anymore.
718718

@@ -750,7 +750,7 @@
750750
* Fixed some pyperclip clipboard interaction bugs on Linux
751751
* Fixed some timing bugs when running unit tests in parallel by using monkeypatch
752752
* Enhancements
753-
* Enhanced tab-completion of cmd2 command names to support case-insensitive completion
753+
* Enhanced tab completion of cmd2 command names to support case-insensitive completion
754754
* Added an example showing how to remove unused commands
755755
* Improved how transcript testing handles prompts with ANSI escape codes by stripping them
756756
* Greatly improved implementation for how command output gets piped to a shell command
@@ -766,7 +766,7 @@
766766
* Enhancements
767767
* Organized all attributes used to configure the ParserManager into a single location
768768
* Set the default value of `abbrev` to `False` (which controls whether or not abbreviated commands are allowed)
769-
* With good tab-completion of command names, using abbreviated commands isn't particularly useful
769+
* With good tab completion of command names, using abbreviated commands isn't particularly useful
770770
* And it can create complications if you are't careful
771771
* Improved implementation of `load` to use command queue instead of nested inner loop
772772

@@ -778,7 +778,7 @@
778778
* Ability to pipe ``cmd2`` command output to a shell command is now more reliable, particularly on Windows
779779
* Fixed a bug in ``pyscript`` command on Windows related to ``\`` being interpreted as an escape
780780
* Enhancements
781-
* Ensure that path and shell command tab-completion results are alphabetically sorted
781+
* Ensure that path and shell command tab completion results are alphabetically sorted
782782
* Removed feature for load command to load scripts from URLS
783783
* It didn't work, there were no unit tests, and it felt out of place
784784
* Removed presence of a default file name and default file extension
@@ -801,8 +801,8 @@
801801
* Enhancements
802802
* Added the ability to exclude commands from the help menu (**eof** included by default)
803803
* Redundant **list** command removed and features merged into **history** command
804-
* Added **pyscript** command which supports tab-completion and running Python scripts with arguments
805-
* Improved tab-completion of file system paths, command names, and shell commands
804+
* Added **pyscript** command which supports tab completion and running Python scripts with arguments
805+
* Improved tab completion of file system paths, command names, and shell commands
806806
* Thanks to Kevin Van Brunt for all of the help with debugging and testing this
807807
* Changed default value of USE_ARG_LIST to True - this affects the beavhior of all **@options** commands
808808
* **WARNING**: This breaks backwards compatibility, to restore backwards compatibility, add this to the

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Main Features
3737
- Settable environment parameters
3838
- Parsing commands with arguments using `argparse`, including support for subcommands
3939
- Unicode character support
40-
- Good tab-completion of commands, subcommands, file system paths, and shell commands
41-
- Automatic tab-completion of `argparse` flags when using one of the `cmd2` `argparse` decorators
40+
- Good tab completion of commands, subcommands, file system paths, and shell commands
41+
- Automatic tab completion of `argparse` flags when using one of the `cmd2` `argparse` decorators
4242
- Support for Python 3.5+ on Windows, macOS, and Linux
4343
- Trivial to provide built-in help for all commands
4444
- Built-in regression testing framework for your applications (transcript-based testing)
@@ -96,7 +96,7 @@ Instructions for implementing each feature follow.
9696
- By default the docstring for your **do_foo** method is the help for the **foo** command
9797
- NOTE: This doesn't apply if you use one of the `argparse` decorators mentioned below
9898
- Can provide more custom help by creating a **help_foo** method (except when using `argparse` decorators)
99-
- Can provide custom tab-completion for the **foo** command by creating a **complete_foo** method
99+
- Can provide custom tab completion for the **foo** command by creating a **complete_foo** method
100100
- Easy to upgrade an existing `cmd` app to `cmd2`
101101
- Run your `cmd2` app using the built-in REPL by executing the **cmdloop** method
102102

@@ -164,14 +164,14 @@ Instructions for implementing each feature follow.
164164
- Option to display long output using a pager with ``cmd2.Cmd.ppaged()``
165165
- Optionally specify a startup script that end users can use to customize their environment
166166

167-
- Top-notch tab-completion capabilities which are easy to use but very powerful
167+
- Top-notch tab completion capabilities which are easy to use but very powerful
168168
- For a command **foo** implement a **complete_foo** method to provide custom tab completion for that command
169169
- But the helper methods within `cmd2` discussed below mean you would rarely have to implement this from scratch
170-
- Commands which use one of the `argparse` decorators have automatic tab-completion of `argparse` flags
170+
- Commands which use one of the `argparse` decorators have automatic tab completion of `argparse` flags
171171
- And also provide help hints for values associated with these flags
172172
- Experiment with the [argprint.py](https://github.com/python-cmd2/cmd2/blob/master/examples/arg_print.py) example
173173
using the **oprint** and **pprint** commands to get a feel for how this works
174-
- `path_complete` helper method provides flexible tab-completion of file system paths
174+
- `path_complete` helper method provides flexible tab completion of file system paths
175175
- See the [paged_output.py](https://github.com/python-cmd2/cmd2/blob/master/examples/paged_output.py) example for a simple use case
176176
- See the [python_scripting.py](https://github.com/python-cmd2/cmd2/blob/master/examples/python_scripting.py) example for a more full-featured use case
177177
- `flag_based_complete` helper method for tab completion based on a particular flag preceding the token being completed

cmd2/argparse_custom.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def my_choices_method(self):
6262
return my_generated_list
6363
6464
completer_function
65-
Pass a tab-completion function that does custom completion. Since custom tab completion operations commonly
66-
need to modify cmd2's instance variables related to tab-completion, it will be rare to need a completer
65+
Pass a tab completion function that does custom completion. Since custom tab completion operations commonly
66+
need to modify cmd2's instance variables related to tab completion, it will be rare to need a completer
6767
function. completer_method should be used in those cases.
6868
6969
Example:
@@ -90,7 +90,7 @@ def my_completer_function(text, line, begidx, endidx):
9090
path_filter=lambda path: os.path.isdir(path))
9191
parser.add_argument('-o', '--options', choices_method=completer_method)
9292
93-
Of the 5 tab-completion parameters, choices is the only one where argparse validates user input against items
93+
Of the 5 tab completion parameters, choices is the only one where argparse validates user input against items
9494
in the choices list. This is because the other 4 parameters are meant to tab complete data sets that are viewed
9595
as dynamic. Therefore it is up to the developer to validate if the user has typed an acceptable value for these
9696
arguments.
@@ -118,7 +118,7 @@ def my_completer_method(self, text, line, begidx, endidx, arg_tokens)
118118
the developer to determine if the user entered the correct argument type (e.g. int) and validate their values.
119119
120120
CompletionError Class:
121-
Raised during tab-completion operations to report any sort of error you want printed by the AutoCompleter
121+
Raised during tab completion operations to report any sort of error you want printed by the AutoCompleter
122122
123123
Example use cases
124124
- Reading a database to retrieve a tab completion data set failed
@@ -231,7 +231,7 @@ def generate_range_error(range_min: int, range_max: Union[int, float]) -> str:
231231

232232
class CompletionError(Exception):
233233
"""
234-
Raised during tab-completion operations to report any sort of error you want printed by the AutoCompleter
234+
Raised during tab completion operations to report any sort of error you want printed by the AutoCompleter
235235
236236
Example use cases
237237
- Reading a database to retrieve a tab completion data set failed
@@ -356,8 +356,8 @@ def _add_argument_wrapper(self, *args,
356356
# Added args used by AutoCompleter
357357
:param choices_function: function that provides choices for this argument
358358
:param choices_method: cmd2-app method that provides choices for this argument
359-
:param completer_function: tab-completion function that provides choices for this argument
360-
:param completer_method: cmd2-app tab-completion method that provides choices for this argument
359+
:param completer_function: tab completion function that provides choices for this argument
360+
:param completer_method: cmd2-app tab completion method that provides choices for this argument
361361
:param suppress_tab_hint: when AutoCompleter has no results to show during tab completion, it displays the current
362362
argument's help text as a hint. Set this to True to suppress the hint. If this argument's
363363
help text is set to argparse.SUPPRESS, then tab hints will not display regardless of the

docs/features/argument_processing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Subcommands are supported for commands using either the ``@with_argparser`` or
325325
is based on argparse sub-parsers.
326326

327327
You may add multiple layers of subcommands for your command. ``cmd2`` will
328-
automatically traverse and tab-complete subcommands for all commands using
328+
automatically traverse and tab complete subcommands for all commands using
329329
argparse.
330330

331331
See the subcommands_ example to learn more about how to

docs/features/completion.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Completion
22
==========
33

4-
``cmd2`` adds tab-completion of file system paths for all built-in commands
4+
``cmd2`` adds tab completion of file system paths for all built-in commands
55
where it makes sense, including:
66

77
- ``edit``
88
- ``run_pyscript``
99
- ``run_script``
1010
- ``shell``
1111

12-
``cmd2`` also adds tab-completion of shell commands to the ``shell`` command.
12+
``cmd2`` also adds tab completion of shell commands to the ``shell`` command.
1313

1414
Additionally, it is trivial to add identical file system path completion to
1515
your own custom commands. Suppose you have defined a custom command ``foo`` by
@@ -37,9 +37,9 @@ Tab Completion Using Argparse Decorators
3737
----------------------------------------
3838

3939
When using one the Argparse-based :ref:`api/decorators:Decorators`, ``cmd2``
40-
provides automatic tab-completion of flag names.
40+
provides automatic tab completion of flag names.
4141

42-
Tab-completion of argument values can be configured by using one of five
42+
Tab completion of argument values can be configured by using one of five
4343
parameters to ``argparse.ArgumentParser.add_argument()``
4444

4545
- ``choices``
@@ -52,9 +52,9 @@ demonstration of how to use the ``choices_function`` and ``choices_method``
5252
parameters. See the arg_decorators_ or argparse_completion_ example for a
5353
demonstration of how to use the ``completer_method`` parameter.
5454

55-
When tab-completing flags and/or argument values for a ``cmd2`` command using
55+
When tab completing flags and/or argument values for a ``cmd2`` command using
5656
one of these decorators, ``cmd2`` keeps track of state so that once a flag has
57-
already previously been provided, it won't attempt to tab-complete it again.
57+
already previously been provided, it won't attempt to tab complete it again.
5858
When no completion results exists, a hint for the current argument will be
5959
displayed to help the user.
6060

@@ -66,7 +66,7 @@ displayed to help the user.
6666
CompletionItem For Providing Extra Context
6767
------------------------------------------
6868

69-
When tab-completing things like a unique ID from a database, it can often be
69+
When tab completing things like a unique ID from a database, it can often be
7070
beneficial to provide the user with some extra context about the item being
7171
completed, such as a description. To facilitate this, ``cmd2`` defines the
7272
``CompletionItem`` class which can be returned from any of the 4 completion

docs/features/embedded_python_shells.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ code directory for an example of how to achieve this in your own applications.
6767
Using ``py`` to run scripts directly is considered deprecated. The newer
6868
``run_pyscript`` command is superior for doing this in two primary ways:
6969

70-
- it supports tab-completion of file system paths
70+
- it supports tab completion of file system paths
7171
- it has the ability to pass command-line arguments to the scripts invoked
7272

7373
There are no disadvantages to using ``run_pyscript`` as opposed to ``py

docs/features/initialization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ override:
133133
command via ``self`` (Default: ``False``)
134134
- **macros**: dictionary of macro names and their values
135135
- **max_completion_items**: max number of CompletionItems to display during
136-
tab-completion (Default: 50)
136+
tab completion (Default: 50)
137137
- **pager**: sets the pager command used by the ``Cmd.ppaged()`` method for
138138
displaying wrapped output using a pager
139139
- **pager_chop**: sets the pager command used by the ``Cmd.ppaged()`` method

docs/features/os.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ to type::
2020

2121
(Cmd) !ls -al
2222

23-
NOTE: ``cmd2`` provides user-friendly tab-completion throughout the process of
23+
NOTE: ``cmd2`` provides user-friendly tab completion throughout the process of
2424
running a shell command - first for the shell command name itself, and then for
2525
file paths in the argument section.
2626

docs/features/scripting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Running Command Scripts
3434

3535
Command script files can be executed using the built-in ``run_script`` command
3636
or ``@`` shortcut. Both ASCII and UTF-8 encoded unicode text files are
37-
supported. The ``run_script`` command supports tab-completion of file system
37+
supported. The ``run_script`` command supports tab completion of file system
3838
paths. There is a variant ``_relative_run_script`` command or ``@@``
3939
shortcut for use within a script which uses paths relative to the first script.
4040

@@ -73,7 +73,7 @@ using ``run_pyscript`` is shown below along with the arg_printer_ script::
7373
arg 2: 'bar'
7474
arg 3: 'baz 23'
7575

76-
``run_pyscript`` supports tab-completion of file system paths, and as shown
76+
``run_pyscript`` supports tab completion of file system paths, and as shown
7777
above it has the ability to pass command-line arguments to the scripts invoked.
7878

7979
Python scripts executed with ``run_pyscript`` can run ``cmd2`` application

0 commit comments

Comments
 (0)