bmc / fortune

Python Fortune Program
http://software.clapper.org/fortune/
Apache License 2.0
69 stars 20 forks source link

Windows: env var `$FORTUNE_FILE` not found by default #7

Closed pabloqpacin closed 1 year ago

pabloqpacin commented 1 year ago

I installed the program via pip and downloaded your fortune cookies. Now I can easily run fortune path/to/file and even fortune $FORTUNE_FILE as displayed on the screenshot. However, a good simple fortune fails to find the variable.

This is how I set the variable on my $PROFILE, if it helps:

$FORTUNE_FILE = Get-ChildItem -Path "$env:HOMEPATH\dotfiles\docs\fortunes" | Get-Random | Select-Object -ExpandProperty FullName

It's great as it is, but maybe could you describe how to properly set up the environment variable on Windows? Thanks!!


image

bmc commented 1 year ago

Honestly, I don't use Windows, except for gaming. I don't test any of my stuff on Windows; I routinely use my stuff, including fortune, on Unix and MacOS systems.

That said, perhaps this article might help: https://www.computerhope.com/issues/ch000549.htm

That's consistent with my recollection of how one sets environment variables on Windows.

pabloqpacin commented 1 year ago

Alright, thank you sir.