Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom paths AND the default path #362

Closed
aserrallerios opened this issue May 26, 2020 · 13 comments · Fixed by #409
Closed

Use custom paths AND the default path #362

aserrallerios opened this issue May 26, 2020 · 13 comments · Fixed by #409
Labels
new feature New feature or request

Comments

@aserrallerios
Copy link

I wonder, how can I use the --path option to load the default folder and other folders?

Something like:

    navi --path '~/.cheats:<default_cheats_folder>'     # uses custom cheats

Is the <default_cheats_folder> available somewhere as a variable we could use?

@aserrallerios aserrallerios added the new feature New feature or request label May 26, 2020
@aserrallerios aserrallerios changed the title Use multiple paths AND the default path Use custom paths AND the default path May 26, 2020
@denisidoro
Copy link
Owner

It's not available as a variable at the moment.

However, it's always data_dir/navi.

Does that cover your use case?

@aserrallerios
Copy link
Author

Not sure if there's a way of getting the XDG folders in macos. Not that I'm aware of.

@denisidoro
Copy link
Owner

denisidoro commented May 26, 2020

According to the link above, the full path should be $HOME/Library/Application Support/navi

⚠️ beware of the space in Application Support

@aserrallerios
Copy link
Author

I mean, no way of getting it programmatically in a platform independent way.

Anyway, if you cannot think on something else or a new navi feature, I'll just set a platform dependent rule.

@denisidoro
Copy link
Owner

I could add a navi path default-cheats command. WDYT?

@aserrallerios
Copy link
Author

Do you mean something like this?

    navi --path "~/.cheats:$(navi path default-cheats)"     # uses custom cheats

@denisidoro
Copy link
Owner

Yes

@aserrallerios
Copy link
Author

Yeah, that'd be pretty nice :)

@shinzui
Copy link

shinzui commented Sep 11, 2020

Making the path configurable makes it easier to configure navi in Nix.

@denisidoro
Copy link
Owner

@shinzui, what path? The one that navi downloads .cheats to by default?

Doesn't $NAVI_PATH cover you use case?

@shinzui
Copy link

shinzui commented Sep 11, 2020

Doesn't $NAVI_PATH cover you use case?

That works. Thanks.

@aserrallerios
Copy link
Author

What is supposed to be the right value for $NAVI_PATH?

If the path it's empty, it works (shows downloaded cheats), if it points to /Users/aserralle/Library/Application Support/navi/cheats it doesn't.

❯ ls "/Users/aserralle/Library/Application Support/navi/cheats"
Kidman1670__cheats      caojianhua__MyCheat     chazeon__my-navi-cheats denisidoro__cheats      denisidoro__dotfiles    mrVanDalo__navi-cheats

@denisidoro
Copy link
Owner

At the moment, when using $NAVI_PATH, subfolders aren't taken into account.

I can change that in the next version (+ add navi path default-cheats).

In the meantime, you can separate different directories by ::

NAVI_PATH="$(find "$HOME/Library/Application Support/navi/cheats/" -type d | tr '\n' ':')" navi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants