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

Reading direnv's status could be confusing for newcomers #1211

Open
thenbe opened this issue Dec 9, 2023 · 0 comments
Open

Reading direnv's status could be confusing for newcomers #1211

thenbe opened this issue Dec 9, 2023 · 0 comments
Labels

Comments

@thenbe
Copy link

thenbe commented Dec 9, 2023

Is your feature request related to a problem? Please describe.
For unfamiliar users, it's not clear what the possible allowed state enum values (such as 0, 1, or 2) represent. example.

Describe the solution you'd like
we could make it more readable by taking a leaf out of the http book, where both a code and human-readable text are returned. For example:

status_code: 200
status_text: SUCCESS

status_code: 404
status_text: NOT FOUND
{
	"state": {
		"foundRC": {
			"status": {
				"code": 0,
				"text": "ALLOWED"
			},
			"path": "..."
		},
		"loadedRC": {
			"status": {
				"code": 2,
				"text": "DENIED"
			},
			"path": "..."
		}
	}
}

This solution is preferred as it would remain self-documenting as the codebase evolves.

Describe alternatives you've considered

  • document a human-readable description of all possible allowed states in direnv --help or direnv status --help
  • do nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant