Giter Site home page Giter Site logo

Comments (5)

scop avatar scop commented on July 23, 2024 1

JFYI/aside rg 3rd party loader in #1148

from bash-completion.

akinomyoga avatar akinomyoga commented on July 23, 2024

The function was removed in d659507

from bash-completion.

akinomyoga avatar akinomyoga commented on July 23, 2024

FWIW, i manually edited ag's completion script to use _comp__split_longopt instead, and all is well.

_comp__split_longopt is not a part of public API and can be removed in the future at any time.

So i think the real question is a matter of "public api management" and "semver".

Any functions and variables whose name contains __ as a substring are not public stable interfaces and considered subject to change.

For the semver, we might have kept the old names.

I actually had a doubt about removing the old names even if they become a part of private APIs. But I haven't tried to keep it because a reasoning was given in the commit message, and also _split_longopt was technically not a public API because we hadn't specified the range of the public API at all until 2.11.

from bash-completion.

akinomyoga avatar akinomyoga commented on July 23, 2024

I've checked the ag completion. The ag completion seems to be based on bash-completion 1 API, which is the reason that it directly depends on _split_longopt. The ag completion also depends on the API _get_cword, which is explicitly deprecated in bash-completion 2.0.

  • In bash-completion 2 API, from the beginning, _split_longopt has been an internal function that is not supposed to be called by completion functions for specific commands. The feature provided by _split_longopt was switched to the -s option of _init_completion in bash-completion v1.90. That was made by commit a54857c 11 years ago.
  • Another function _get_cword that the ag completion uses was explicitly marked as @deprecated in bash-completion v1.2 by commit a8dd58c 14 years ago.

I think the ag completion needs to switch to the bash-completion 2 API.

from bash-completion.

akinomyoga avatar akinomyoga commented on July 23, 2024

I thought about submitting a PR to the upstream ag, but the mentioned repository https://github.com/ggreer/the_silver_searcher seems stale; there doesn't seem to be any activities for four years. Are there any repository of ag that is actively maintained?

Instead, there seem to be many alternative tools [1]. For example, the latest version of ripgrep (rg 14.0.0) seems to offer a completion setting for Bash [2].

from bash-completion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.