Giter Site home page Giter Site logo

IFS='*' freezes bash about bash-completion HOT 5 CLOSED

scop avatar scop commented on July 23, 2024
IFS='*' freezes bash

from bash-completion.

Comments (5)

scop avatar scop commented on July 23, 2024

Reproduced, but I'm not sure why you'd do that?

from bash-completion.

imgx64 avatar imgx64 commented on July 23, 2024

To be honest, no reason at all. I was just thinking of ways to break my own scripts (and making them fool-proof in the process), and ended up with a frozen shell..

But I can think of a hypothetical reason, splitting a *-delimited string:

$ foo='a*b*c'
$ set -f
$ IFS='*'
$ bar=($foo)
$ declare -p bar
declare -a bar='([0]="a" [1]="b" [2]="c")'

from bash-completion.

imgx64 avatar imgx64 commented on July 23, 2024

This seems to be a bug in bash ( https://lists.gnu.org/archive/html/bug-bash/2016-07/msg00004.html ), but I think bash-completion could at least print an error instead of looping infinitely. The long-term solution would be implementing cleanly controllable completion environment.

from bash-completion.

scop avatar scop commented on July 23, 2024

If someone wants to submit a clean, minimal patch that works around this, I can have a look, but honestly I'm not too keen on spending much time at all for such a corner case especially if it's caused by a bash bug.

from bash-completion.

imgx64 avatar imgx64 commented on July 23, 2024

This was fixed in Bash. Closing.

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.