Skip to content
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

Add --ansi option #16

Merged
merged 3 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ The following is the full list of parameters. Please pass them as

Corresponds to ``--no-mouse`` option.

``ansi``
``True`` to enable ansi colors mode. ``None`` by default.

Corresponds to ``--ansi`` option.



Author and license
------------------
Expand Down Expand Up @@ -189,6 +195,8 @@ Version 0.6.0.20.0

To be released. Bundles ``fzf`` 0.20.0.

Added ``ansi`` option. [`#16` by Erik Lilja]


Version 0.5.0.20.0
~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 3 additions & 0 deletions iterfzf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def iterfzf(
multi=False, mouse=True, print_query=False,
# Layout:
prompt='> ',
ansi=None,
preview=None,
# Misc:
query='', encoding=None, executable=BUNDLED_EXECUTABLE or EXECUTABLE_NAME
Expand All @@ -53,6 +54,8 @@ def iterfzf(
cmd.append('--query=' + query)
if preview:
cmd.append('--preview=' + preview)
if ansi:
cmd.append('--ansi')
encoding = encoding or sys.getdefaultencoding()
proc = None
stdin = None
Expand Down
1 change: 1 addition & 0 deletions iterfzf/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def iterfzf(
print_query: bool = ...,
# Layout:
prompt: str = ...,
ansi: bool = ...,
preview: Optional[str] = ...,
# Misc:
query: str = ...,
Expand Down