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

Mummy likes better docs~ #41

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Mummy likes better docs~ #41

wants to merge 2 commits into from

Conversation

poopsicles
Copy link
Contributor

This adds documentation (a bit too much, even) on how to set things with env. vars. on most OSes (Darwin, NT, Linux)

@Gankra
Copy link
Owner

Gankra commented Nov 12, 2023

incoming changes may affect these docs: #43

mommy will review this in the morning, thank you for your patience~

Copy link
Owner

@Gankra Gankra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of good stuff in here! Most of my concerns are with the order information is presented in. For instance, it's weird to explain how to get a value first when the user is primarily interested in setting them (and can't possibly have any set yet). Explaining how to set, and then showing how to check it worked, would make more sense.

I'm approving this now, but lmk if you want to do revisions. If you don't I can do my own followup passes.


You can see all of your current settings by running `export -p | grep CARGO_MOMMY`.

Depending on the one you have, you'll have to modify the contents of your rcfile (with [vim](https://github.com/vim/vim), [nano](https://nano-editor.org/), [helix](https://github.com/helix-editor/helix) etc.), or create one if it doesn't exist.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a little excessive to tell a rust programmer how to edit a text file. X3

export CARGO_MOMMYS_MOODS="chill/thirsty"
```

To remove any of the settings, simply delete the associated line in the file.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting that you call out bashrc and zshenv but not the most-generic ~/.profile. I know you sometimes HAVE to use those two files, but idk how many shells don't look at either but do look at ~/.profile. I do know fish doesn't look at any of the 3, making it the hardest to doc/support. X3

Change `~/.bashrc` to include your settings. Set them with `export VAR_NAME=value`, for example:

```sh
$ cat ~/.bashrc
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably it would be simpler to just show the contents of the file once (since it's the same thing regardless of file). Also including the cat expression might be confusing (might make them think they should be adding that to the file).

> set | find "CARGO_MOMMY"
```

- For Powershell (now might be a good time to learn the difference between Windows `powershell.exe` and Microsoft `pwsh.exe`):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait is it? What's the difference they should know? I would have thought pwsh vs cmd would be a bigger concern.

@poopsicles
Copy link
Contributor Author

aight i'll make a few revisions and get back to ya

@Gankra
Copy link
Owner

Gankra commented Nov 20, 2023

fyi i had another Being Extremely Normal day and wrote a new cargo-mommy book

https://faultlore.com/cargo-mommy/book/

I did my best to preserve the README around your PR to avoid conflicts (seems like it worked!)

and left two potential places for your docs (because i really am TERRIBLE at env-var stuff lol):

@poopsicles
Copy link
Contributor Author

hehe saw your tweets about the book, loving it so far

my laptop inhaled a bit of steam and the motherboard is fried, so i haven’t been able to work on anything so far…i think i’ll be up and running by this weekend

but if anyone in the meantime wants to flesh it out then that’ll be cool

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.

2 participants