Skip to content

Commit

Permalink
Updated CHANGELOG for 0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
scopatz committed Oct 1, 2018
1 parent 7d61254 commit a5ead3f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 57 deletions.
53 changes: 53 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,59 @@ py-bash-completion Change Log

.. current developments
v0.2.5
====================

**Fixed:**

* bash_completions to include special characters in lprefix

Previously, glob expansion characters would not be included in lprefix for replacement

.. code-block:: sh
$ touch /tmp/abc
$ python
>>> from bash_completion import bash_completions
>>>
>>> def get_completions(line):
... split = line.split()
... if len(split) > 1 and not line.endswith(' '):
... prefix = split[-1]
... begidx = len(line.rsplit(prefix)[0])
... else:
... prefix = ''
... begidx = len(line)
... endidx = len(line)
... return bash_completions(prefix, line, begidx, endidx)
...
>>> get_completions('ls /tmp/a*')
({'/tmp/abc '}, 0)
Now, lprefix begins at the first special character:
.. code-block:: sh
$ python
>>> from bash_completion import bash_completions
>>>
>>> def get_completions(line):
... split = line.split()
... if len(split) > 1 and not line.endswith(' '):
... prefix = split[-1]
... begidx = len(line.rsplit(prefix)[0])
... else:
... prefix = ''
... begidx = len(line)
... endidx = len(line)
... return bash_completions(prefix, line, begidx, endidx)
...
>>> get_completions('ls /tmp/a*')
({'/tmp/abc '}, 7)
v0.2.4
====================
Expand Down
57 changes: 0 additions & 57 deletions news/fix-lprefix-computation.rst

This file was deleted.

0 comments on commit a5ead3f

Please sign in to comment.