Code Monkey home page Code Monkey logo

Comments (10)

Pixcell avatar Pixcell commented on May 21, 2024 3

In case anyone with mac stumble onto this issue, here is the fix:

apache/openwhisk#2924 (comment)

_get_comp_words_by_ref: command not found

It looks that for Mac users in addition of installing the bash-completion

brew install bash-completion
The user also have to configure bash-completion package in their ~/.bash_profile if they have one or in the ~/.profile
By adding the following

if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
fi

from cobra.

bep avatar bep commented on May 21, 2024

@eparis any tips?

from cobra.

eparis avatar eparis commented on May 21, 2024

_init_completion is supposed to be included either with bash or with the bash_completions package...

from cobra.

eparis avatar eparis commented on May 21, 2024

I guess we need to have it fail silently instead of letting users know they need bash-completions > version 1.90 (I think that's where it was added)

I wouldn't want a noisy failure in a script loaded at login....

from cobra.

eparis avatar eparis commented on May 21, 2024

http://anonscm.debian.org/cgit/bash-completion/bash-completion.git/tree/bash_completion#n669

from cobra.

eparis avatar eparis commented on May 21, 2024

I could probably switch to _get_comp_words_by_ref which seems to be even older...

_get_comp_words_by_ref: ver 1.2 was June 2010
_init_completion: ver 1.90 was Nov 2011

I'll take suggestions, but it seems to me like Nov 2011 should recent enough support...

from cobra.

bep avatar bep commented on May 21, 2024

In my case I was trying to get it running under zsh --- It runs fine in bash on my Ubuntu 14.10. I will close this as "my fault".

from cobra.

eparis avatar eparis commented on May 21, 2024

I haven't looked at zsh, but it might be relatively easy to support, dunno.....

from cobra.

marcmo avatar marcmo commented on May 21, 2024

this also causes problems under Mac OS using brew. The default bash-completion version you get with brew is too old.
Installing the newer version is a no-go for some since it requires to switch to a newer bash version (4.x) but OS X only ships with 3.x.
why not support the older bash-completion? what's the drawback?

~ > bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
~ > brew info bash-completion
bash-completion: stable 1.3 (bottled)
Programmable bash completion
https://bash-completion.alioth.debian.org/
~ > system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.10.4 (14E46)
      Kernel Version: Darwin 14.4.0

from cobra.

eparis avatar eparis commented on May 21, 2024

The only 'drawback' is that I don't have a Mac and don't use 5 year out of date bash-completion. So I don't know how to do it. _init_completion (and in turn __get_comp_words_by_ref) are incredibly complex functions I can't truly understand and so I will not copy them wholesale into our codebase (as then we have to maintain them, and I'm just not up to the task)

If someone writes a 'simple' patch which adds compatibility further back, I'd be REALLY happy to take it. (where simple means I can understand it). I have no idea what is or isn't possible on a mac. Maybe it has _comp_words_by_ref and you can find a way to switch to that directly?

from cobra.

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.