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

[WIP] Add welcome cheatsheet #254

Merged
merged 3 commits into from
Mar 15, 2020
Merged

[WIP] Add welcome cheatsheet #254

merged 3 commits into from
Mar 15, 2020

Conversation

denisidoro
Copy link
Owner

@denisidoro denisidoro commented Mar 13, 2020

In case no cheatsheets are found (if navi stops bundling cheats, for example: cf #237), an initial "setup" (which is a fallback cheatsheet in reality) is shown.

Capture d’écran 2020-03-13 à 13 02 46

It would be nice to have a header message, but this must be passed to fzf before we start looking for cheats in the filesystem, so I can't think of a way to add it.

This is a PoC in the sense that navi repo ... doesn't exist yet, for example.

@denisidoro denisidoro changed the base branch from master to repo/wip March 15, 2020 00:44
@denisidoro denisidoro merged commit 25cea3c into repo/wip Mar 15, 2020
@denisidoro denisidoro deleted the welcome branch March 15, 2020 00:46
denisidoro added a commit that referenced this pull request Mar 15, 2020
This PR makes navi stop bundling `.cheat` files and makes it able to download from repos on GitHub, using a standardized config directory.

- it fixes #233 and #237
- it makes #52, #256 and #257 much easier to implement
- it makes #40 harder to implement
- it's an alternate solution to #140 
- it's influenced by #238 and #254.

This PR ended up being much bigger than I would like so if you could review only this description it would be already very nice!

When navi is started for the first time, a welcome cheatsheet is shown:
![Screenshot at 2020-03-15 10-20-04](https://user-images.githubusercontent.com/3226564/76702240-19fffd80-66a7-11ea-884f-97c565bc1ead.png)

If the user selects the first option, the user is prompted to download `.cheat`s from https://github.com/denisidoro/cheats: 
![Screenshot at 2020-03-15 10-20-35](https://user-images.githubusercontent.com/3226564/76702239-19fffd80-66a7-11ea-8f69-324f669b1e01.png)
![Screenshot at 2020-03-15 10-22-59](https://user-images.githubusercontent.com/3226564/76702236-18363a00-66a7-11ea-8ff4-53b497f85888.png)

The config folder is populated:
![Screenshot at 2020-03-15 10-21-11](https://user-images.githubusercontent.com/3226564/76702238-19676700-66a7-11ea-8367-3e7b5733f2b4.png)

When run again, cheats are available:
![Screenshot at 2020-03-15 10-21-34](https://user-images.githubusercontent.com/3226564/76702237-19676700-66a7-11ea-9c2a-d8829340f3e9.png)

### Breaking changes

In order to make navi stop bundling shell widgets as well, a breaking change has been introduced: `source $(navi widget bash)` won't work anymore. It should be `source <(navi widget bash)` now. Any ideas on how to make this transition more graceful?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant