-
Notifications
You must be signed in to change notification settings - Fork 124
New quoted completion #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
51b740d
First version of allowing quotes in tab completion
kmvanbrunt adbcec5
Merge branch 'master' into quoted_completion
kmvanbrunt b0480b3
Forgot a flag check
kmvanbrunt 0966c88
More progress
kmvanbrunt cafdc1c
Backing up work
kmvanbrunt 221deb8
Merge branch 'master' into quoted_completion
tleonhardt 6ac3d49
Trying to change readline variable
kmvanbrunt 3931341
Merge branch 'quoted_completion' of github.com:python-cmd2/cmd2 into …
kmvanbrunt 25ce7ea
Merging stuff from other branches
kmvanbrunt b55f598
Fixed unit test
kmvanbrunt 78073c4
Merging in tests
kmvanbrunt 41ae7e9
GNU readline hack to prevent automatically closing quotes
kmvanbrunt 1c59c15
Updated complete_shell to handle spaces in exes
kmvanbrunt 51b9056
Updated remaining completion functions to handle spaces within quotes
kmvanbrunt c15a3fc
Fixed Pycharm warnings
kmvanbrunt f691fde
Changed when a closing quote is added
kmvanbrunt b33961f
Don't try to tab complete when the cursor is right after a closed quote
kmvanbrunt 413b04f
Fixed pycharm warnings
kmvanbrunt 6b95022
Added unit tests for new completers
kmvanbrunt 07af2ee
Allowing quotes in help command
kmvanbrunt 44c38e3
Added unit tests for completions with quotes
kmvanbrunt c2a3f67
More quoted completion unit tests
kmvanbrunt 0310ec7
Unit test for cursor right after closing quote
kmvanbrunt 42fbd78
First steps toward automatically added opening quote
kmvanbrunt 0c367e1
Appending closing quote and space when needed
kmvanbrunt be197be
Simplified function that tokenizes for tab completion
kmvanbrunt 892ba85
Updated unit tests to reflect new completion behavior
kmvanbrunt e674ed6
Fixed unit test
kmvanbrunt bc28141
Adding opening quote with GNU readline
kmvanbrunt 2a3c792
Automatically adding an opening quote if needed during tab completion
kmvanbrunt 7900be9
Not altering copy of completion_token
kmvanbrunt c1b8776
Renamed variable
kmvanbrunt 5e7d9c3
Merge branch 'master' into quoted_completion
kmvanbrunt 213afe5
Using same completer delimiters. Added customization for how tab-comp…
kmvanbrunt 8ba1e4e
Made path completion work with tildes again
kmvanbrunt 7c56341
Fixed some unit tests
kmvanbrunt 4203c2f
Made cmd2.py executable
kmvanbrunt 88cd9e9
Fixed index bug
kmvanbrunt 62d558d
Fixed Windows since pyreadline does not implement set_completion_disp…
kmvanbrunt 3617748
Expanded do_shell parsing of command
kmvanbrunt 0e927cc
Merge branch 'master' into quoted_completion
kmvanbrunt 58a2248
Returning on error
kmvanbrunt 8f91bf2
Fixed unit test failure on Python 2.7
tleonhardt b95a21f
Made sure quoting of a token works on Python 2.7.
kmvanbrunt d907c77
Updated comments
kmvanbrunt f4570b6
Renamed a function
kmvanbrunt 57e53ee
shutil.get_terminal_size does not exist before Python 3.3
kmvanbrunt 0014b4d
Added generic code for getting terminal size for Python versions prio…
tleonhardt 1240d0a
Fixed issue where display matches were not being set
kmvanbrunt 109101d
Corrected display_entire_match behavior. A bit of refactoring.
kmvanbrunt 6ff3d2f
Fixed check for unclosed quote
kmvanbrunt 2ad0587
Fixed Pycharm warnings
kmvanbrunt baccdf5
Merge branch 'master' into new_quoted_completion
kmvanbrunt 6d6651c
Updating unit tests for new tab completion behavior
kmvanbrunt 029e0a2
Merge branch 'master' into new_quoted_completion
kmvanbrunt 781d2c5
Don't try to look for subcommands on something that is running as a s…
kmvanbrunt 02e2467
More unit test fixing
kmvanbrunt feb9dc3
More unit test updates
kmvanbrunt 2f41049
Fixed all path matching unit tests
kmvanbrunt 2db4fb3
Finished basic, flag, and index completion unit tests
kmvanbrunt fc500f1
Added better analysis of tab completing shell commands
kmvanbrunt 709217c
Finished subcommand completion unit tests
kmvanbrunt c9e4e39
All existing tab completion unit tests work
kmvanbrunt 3f945dc
Fixed Python 2.7 issue
kmvanbrunt f3cc99c
Increased coverage of completion tests
kmvanbrunt 1cb8b2d
Merge branch 'master' into new_quoted_completion
kmvanbrunt 9d724f2
Make sure completion tokens are never empty
kmvanbrunt a73e6df
Renamed exclude_from_help to hidden_commands
kmvanbrunt bf05e5d
Fixed unit tests
kmvanbrunt 54073dd
Added get_all_commands
kmvanbrunt fb7171a
Fixed GNU readline issue where the prompt did not always redraw properly
kmvanbrunt f293bbe
Letting readline know we updated the display
kmvanbrunt 65a6482
Added ability to write custom match display functions
kmvanbrunt b9c188a
Renamed completions to matches
kmvanbrunt 4f21fe8
Added shell_cmd_complete() as a stand alone tab-completion function.
kmvanbrunt 51da5c8
Added an extra parsing check
kmvanbrunt 43cc4f7
Updated documentation
kmvanbrunt ac64f1b
Improved token parsing for tab completion
kmvanbrunt 973f666
Fixed issue with negative indexes
kmvanbrunt 0a16f8a
Using shlex.split() again since filenames were being split on periods
kmvanbrunt 55fa6ee
Merge branch 'master' into new_quoted_completion
kmvanbrunt ab865b4
Returning both the unquoted and raw tokens for tab completion
kmvanbrunt 94000bf
Reversed logic for readability
kmvanbrunt 7ffa5f8
Renamed variable for clarity
kmvanbrunt 6cb8fe4
Simplifying the code by calling readline functions directly.
kmvanbrunt c65ece9
Moving code
kmvanbrunt da7d7b5
Removed unused variable
kmvanbrunt bd5fbf9
Moved all completer functions into cmd2 since they will now depend on…
kmvanbrunt 40f8a84
Remove unneeded use of functools.partial
kmvanbrunt efd3b2c
Made subcommand specific completion work with Python 2 in the examples
kmvanbrunt adc0ce8
Moving toward properly tab completing redirections
kmvanbrunt 40ca5eb
Merge branch 'master' into new_quoted_completion
kmvanbrunt 4701a39
Updated documentation
kmvanbrunt 1ebf869
Handling redirection characters in tab completion tokenizing
kmvanbrunt be6af1c
Added functions to set realine line buffer and cursor offset
kmvanbrunt 826b049
Added completion for redirection to every command
kmvanbrunt 2d111d8
Improved parsing for tab completing redirectors
kmvanbrunt f4a1c32
Removed unused imports
kmvanbrunt 0addec3
Fixing unit tests
kmvanbrunt 8082d98
Removed unit test
kmvanbrunt eb851f4
All completer routines now receive the entire token being completed i…
kmvanbrunt f5e009e
Fixed indexing bug and unit test
kmvanbrunt 113da63
Added logic for choosing quote type
kmvanbrunt 48b21fc
Allowing multiple redirectors when tab completing
kmvanbrunt bebf547
Added delimiter_complete function
kmvanbrunt 967c768
Updated comment
kmvanbrunt 5116720
Updated change log
kmvanbrunt 2b4f94f
Simplified code
kmvanbrunt 1dbecfb
Restoring all changes to readline before command loop exits
kmvanbrunt 6b2e975
Added unit tests
kmvanbrunt a16cbaf
Added more unit tests
kmvanbrunt ce76120
Reorganized some unit tests
kmvanbrunt 0ef0e9b
Fixed a case where display_matches wasn't being set. Added unit tests.
kmvanbrunt 88ce0b5
Added checks for readline implementation type
kmvanbrunt 554561b
Addressed code review comments
kmvanbrunt d78dc46
Simplified how to add tab completion to a subcommand
kmvanbrunt 92ab77c
Merge branch 'master' into new_quoted_completion
kmvanbrunt fd14639
Add conditional dependency on enum34 for Python 2.7
tleonhardt 39c45f8
Simplified the readline lib loading
kmvanbrunt 4c2e918
Updated comment
kmvanbrunt bf11c16
Fixed a comment a made a line more readable
kmvanbrunt cd0674f
Fixed comment
kmvanbrunt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the CHANGELOG. If you want, there is probably enough in this PR to constitute a release in and of itself.