GithubHelp home page GithubHelp logo

init shell failed? about mcfly HOT 5 CLOSED

4t8dd avatar 4t8dd commented on August 12, 2024
init shell failed?

from mcfly.

Comments (5)

cantino avatar cantino commented on August 12, 2024

Did you add mcfly init fish | source to your fish config file?

from mcfly.

4t8dd avatar 4t8dd commented on August 12, 2024

Did you add mcfly init fish | source to your fish config file?

yes, but nothing got written as I inspected.
Something wrong here? But the key bingding works and I can search.

from mcfly.

4t8dd avatar 4t8dd commented on August 12, 2024

should I paste all the init shell to config.fish manually?

EDIT:

@cantino sorry, I missed the line and I should have add the init result to config.fish

But even so, I still got a panic with mcfly dump in fish.

McFly error: Please ensure that MCFLY_HISTORY is set (environment variable not found)

but I found one line in the mcfly init shell:

# We don't need a MCFLY_HISTORY file because we can get the last command in fish_postexec. 
set -g __MCFLY_CMD $MCFLY_PATH --mcfly_history /dev/null --history_format fish             

But in settiings.rs: if MCFLY_HISTORY not found there will be panic. Why? Is this a bug? Or I missed the config.
But I did not see any config like this in readme.

And what would the config.toml file look like? And it should be in XDG_DATA_DIR in MAC where locates
the history.db by default. But I did not find this config file too.

I think I figure it out here.
When to search, the MCFLY_PATH is set to /dev/null, because __MCFLY_COMMAND is set to
`
set -g __MCFLY_CMD $MCFLY_PATH --mcfly_history /dev/null --history_format fish

Then search and add are good from this init shell. But if I just usemcfly dump` or any other command it just failed.
because MCFLY_HISTORY is not set.

So the simplest fix is add line set -g MCFLY_HISTORY /dev/null and it is fix then.

from mcfly.

4t8dd avatar 4t8dd commented on August 12, 2024

PR: #414

from mcfly.

cantino avatar cantino commented on August 12, 2024

Good fix, thank you!

from mcfly.

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.