diff --git a/appendfilename/__init__.py b/appendfilename/__init__.py index ab4a845..16a9541 100755 --- a/appendfilename/__init__.py +++ b/appendfilename/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -PROG_VERSION = u"Time-stamp: <2025-05-14 16:02:13 vk>" +PROG_VERSION = u"Time-stamp: <2026-06-06 12:00:00 vk>" # TODO: # * fix parts marked with «FIXXME» @@ -404,8 +404,14 @@ def main(): # Register our completer function readline.set_completer(SimpleCompleter(vocabulary).complete) - # Use the tab key for completion - readline.parse_and_bind('tab: complete') + # Use the tab key for completion. The binding syntax differs + # between GNU readline and libedit (the latter is used e.g. by + # uv-managed / python-build-standalone interpreters). Without the + # libedit-specific binding, TAB just inserts a literal tab. + if 'libedit' in (readline.__doc__ or ''): + readline.parse_and_bind('bind ^I rl_complete') + else: + readline.parse_and_bind('tab: complete') tabcompletiondescription = '; complete ' + str(len(vocabulary)) + ' words with TAB' diff --git a/pyproject.toml b/pyproject.toml index 0597dbe..191582c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "appendfilename" -version = "2026.05.24.1" +version = "2026.06.06.1" description = "Intelligent appending text to file names, considering file extensions and file tags" license = "GPL-3.0-or-later" readme = { file = "README.org", content-type = "text/plain" }