Giter VIP home page Giter VIP logo

Comments (8)

jethrokuan avatar jethrokuan commented on June 12, 2024

Hi,

This is definitely not intended, but I can reproduce this as well.

However, it doesn't look like something I can easily fix. The code has already been written to generate the completions once, after the function definition: https://github.com/jethrokuan/z/blob/master/conf.d/z.fish#L40

Completions do indeed work after manually running __z_complete. This seems to be a situation where the lines here:

https://github.com/jethrokuan/z/blob/master/conf.d/z.fish#L23-L27

takes a while to define the function, and completes only after __z_complete is run, causing the completions to be produced before the function is defined and are hence invalid.

from z.

manuel-uberti avatar manuel-uberti commented on June 12, 2024

I'm not really familiar with Fish code, so I'm not sure how to help here. You can count me in for tests, though. :)

from z.

jethrokuan avatar jethrokuan commented on June 12, 2024

what I was trying to get is that there's nothing much I can do here, the behaviour we're seeing is (I'm guessing) a result of some race condition that arises from how fish evaluates the code.

from z.

manuel-uberti avatar manuel-uberti commented on June 12, 2024

Probably worth mentioning @faho then, and see if he's got some clue about this.

from z.

faho avatar faho commented on June 12, 2024

Simple: There is already a thing called "j", and fish ships completions for it.

Since z does not ship a completion file, it'll still autoload that one, and that includes:

complete -c j -e

which will erase all completions for the "j" command.

from z.

manuel-uberti avatar manuel-uberti commented on June 12, 2024

Thanks @faho, I confirm that using the default z instead of j works as expected.

from z.

jethrokuan avatar jethrokuan commented on June 12, 2024

Thanks @faho, closing as it's resolved

from z.

manuel-uberti avatar manuel-uberti commented on June 12, 2024

Well, actually I'd like to have j working, but it's ok. :)

from z.

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.