sio / bash-complete-partial-path

Enhanced file path completion in bash (like in zsh)
Apache License 2.0
54 stars 2 forks source link

Compatibility with bash 3.2 #18

Closed sio closed 1 year ago

sio commented 4 years ago

Work on #8 is being done here.

Progress report

Adding support for bash 3.2 turns out to be pretty tricky. The following problems need to be solved:

Development environment

Here is a Dockerfile for convenient interactive testing on old-bash branch:

FROM ghcr.io/sio/bash-complete-partial-path:bash-3.2

RUN apt-get -y install git && \
    apt-get clean

WORKDIR /workdir
ADD https://gist.github.com/sio/e4f50386ef41188529e176b741132072/raw/Makefile .

ENV PY python3
ENV REPO_BRANCH old-bash

Usage:

$ docker build --rm -t oldbash -
...paste the Dockerfile, send EOF with Ctrl+D...
$ docker run -it oldbash
bash-3.2# make test
...will fetch bash-complete-partial-path, checkout the correct branch and execute automated tests...
bash-3.2# source bcpp/bash_completion && _bcpp --defaults
...to try the completion interactively...
sio commented 1 year ago

While this was a fun exercise in software archaeology, adding support for bash 3.2 turned out quite difficult. I do not have enough time and motivation to work on this anymore.

If anyone wishes to pick up where I left, I will gladly review a PR. If you need help getting there, I'm also available for discussion.