Code Monkey home page Code Monkey logo

Comments (5)

CurryEleison avatar CurryEleison commented on May 31, 2024

That looks wrong. Thanks for the detailed report! I'll take a look, but may be a couple of days before I have an update.

from zsh-asdf-prompt.

CurryEleison avatar CurryEleison commented on May 31, 2024

@khustochka , I'm having some issues reproducing what you report. Could you assist me by

  • Showing the output of asdf current as seen when executed in the ~/quails directory
  • Optionally, letting me know if you are on a GNU (i.e. Linux) or POSIX (i.e. macOS) tool chain?
  • Also optionally, letting me know what you have in the environment variables
    • $ZSH_THEME_ASDF_PROMPT_VERSION_RESOLUTION,
    • $ZSH_THEME_ASDF_PROMPT_PREFIX,
    • $ZSH_THEME_ASDF_PROMPT_POSTFIX,
    • $ZSH_THEME_ASDF_PROMPT_FILTER and
    • $ZSH_THEME_ASDF_PROMPT_VERSION_DETAIL

Thanks in advance for your patience.

from zsh-asdf-prompt.

khustochka avatar khustochka commented on May 31, 2024

I am using MacOS, and this may be the root cause of the issue. The elimination of the meaningful text happens here in sed command: https://github.com/CurryEleison/zsh-asdf-prompt/blob/main/zsh-asdf-prompt.plugin.zsh#L51

If I replace it with gsed (GNU sed) it works:

$ echo $'ruby\t3.1\t' | awk '{ print $1 ": " $2 $3 }' - | sed -e :a -e N -e '$!ba' -e 's/\n/, /g'

$ echo $'ruby\t3.1\t' | awk '{ print $1 ": " $2 $3 }' - | gsed -e :a -e N -e '$!ba' -e 's/\n/, /g'
ruby: 3.1

But for multiple entries sed works just fine:

$ echo $'elixir\t1.13.4\t\nerlang\t24.3.4.2\t\nnodejs\tlts\t\nruby\t3.1.2\t' | awk '{ print $1 ": " $2 $3 }' - | sed -e :a -e N -e '$!ba' -e 's/\n/, /g'
elixir: 1.13.4, erlang: 24.3.4.2, nodejs: lts, ruby: 3.1.2

from zsh-asdf-prompt.

CurryEleison avatar CurryEleison commented on May 31, 2024

Awesome report. I have an old mac sitting around somewhere and will see if I can find the right sed magic with it

from zsh-asdf-prompt.

CurryEleison avatar CurryEleison commented on May 31, 2024

Finally found the mac and got the issue sorted, and it will now work on a with vanilla macOS tooling. Thanks for the report!

from zsh-asdf-prompt.

Related Issues (1)

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.