Giter Site home page Giter Site logo

Comments (5)

arturoherrero avatar arturoherrero commented on July 23, 2024 1

@akinomyoga Thank you very much for the feedback. This is the magic of open source.

You are right, I can remove the following lines, and CDPATH works as expected.

complete -d cd
complete -o nospace -F _cd cd

I still have a configuration issue because I want to restrict the cd autocompletion to only directories, but now it also shows environment variables and Bash functions. Anyway, that's not a bash-completion bug.

from bash-completion.

akinomyoga avatar akinomyoga commented on July 23, 2024

Some extra information that could be relevant. This is the output when is not working:

$ complete | grep " cd$"
complete -d cd

I suspect that that is caused by a different framework because bash-completion doesn't include such a setting:

from bash-completion.

akinomyoga avatar akinomyoga commented on July 23, 2024

This line in your config is causing the issue.

from bash-completion.

akinomyoga avatar akinomyoga commented on July 23, 2024

I want to restrict the cd autocompletion to only directories, but now it also shows environment variables

That is related to this setting. The Bash feature cdable_vars allows you to specify a variable name to cd so that cd reads the content of the variable to pick the path to a directory. If you do not specify variable names to cd, you can remove that setting.

and Bash functions.

Hmm, I'm not sure about this one. It doesn't complete the names of shell functions in my environment. Or maybe do you mean "the special variables of Bash" by "Bash functions"?

from bash-completion.

arturoherrero avatar arturoherrero commented on July 23, 2024

@akinomyoga This is the output I was getting:

Screenshot 2024-06-10 at 13 53 30

But you are right again, shopt -s cdable_vars was interfering here.

Thank you very much for your help! I've removed a few lines of code arturoherrero/dotfiles@6e436f6
achieving the same results 🙌

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.