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

UX: Parse recipients as filenames last instead of first #40

Closed
str4d opened this issue Dec 31, 2019 · 0 comments
Closed

UX: Parse recipients as filenames last instead of first #40

str4d opened this issue Dec 31, 2019 · 0 comments

Comments

@str4d
Copy link
Owner

str4d commented Dec 31, 2019

Currently, rage tries parsing a -r/--recipient argument as a filename first. If that file exists, then age will read it as a list of recipients (one per line, ignoring comments and blank lines), returning an error on any non-recipient content. If the file does not exist, then it tries other formats (which are all string-prefixed). However, basically all the string-prefixed formats (excluding e.g. HTTPS URLs) are themselves valid filenames. While it is unlikely that a user would have filenames named after age keys, it is possible that e.g. the GitHub notation (currently github:username, might be changing to @username) could be a filename. The only way around this currently is to move or rename the file, which is not intuitive.

Instead, let's parse the recipient as a filename last. Then if a user really wants to open a filename that is also itself a recipient key, they can simply use an absolute path.

@str4d str4d closed this as completed in 62e9328 Jan 1, 2020
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

No branches or pull requests

1 participant