subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan J Ollos <rjol...@apache.org>
Subject Path completion in 1.10 gives error
Date Thu, 03 May 2018 06:27:42 GMT
I'm on OSX 10.13.4, fully up-to-date with patches. Since updating to
Subversion 1.10 (installed via brew), I get an error when tab-completing a
path:

"-bash: compopt: command not found"

It seems the Bash on OSX is a bit old:

$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
Copyright (C) 2007 Free Software Foundation, Inc.

The use of "compopt" in the bash_completion script was first introduced in
r1695871 (1).

It looks like "compopt" was added in Bash 4.0 (2):

This document details the changes between this version, bash-4.0-alpha,
> and the previous version, bash-3.2-release.
> ...
> 2.  Changes to Readline
> ...
> o.  There is a new `compopt' builtin that allows completion functions to
> modify
>     completion options for existing completions or the completion currently
>     being executed.


Grepping through my "bash_completion.d" it looks like some applications
take the approach of testing for availability of "compopt" before using it:

type compopt &>/dev/null && compopt -o nospace

Is the bash_completion script intended to work with Bash 3.2? There is a
comment referring to Bash 3.x in the script (3), but I'm not sure that I
understand the comment.

If the bash completion is not intended to work with Bash 3.2, any
suggestions to get Subversion's bash_completion working on OSX? I could
install a 4.4.x version of Bash via Brew, but I'm unsure if that's a good
idea and what other impacts it might have on my environment.

- Ryan

(1) https://svn.apache.org/viewvc?view=revision&revision=1695871
(2) https://tiswww.case.edu/php/chet/bash/CHANGES
(3)
https://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/bash_completion

Mime
View raw message