-
Notifications
You must be signed in to change notification settings - Fork 24
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
[newgrp] full implementation #347
base: main
Are you sure you want to change the base?
Conversation
@jgarzik ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small cleanups needed. no major problems.
@@ -14,12 +14,14 @@ gettext-rs.workspace = true | |||
libc.workspace = true | |||
chrono.workspace = true | |||
syslog = "6.1" | |||
libcrypt-rs = "0.1.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always delete the micro version from dependencies.
/// Specifies the group ID or group name. This is a positional argument that must be provided. | ||
#[arg(value_name = "GROUP", required = true)] | ||
group: String, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See datetime/cal.rs for an example of the new style of struct Args
with translation support added.
Follow cal.rs style of struct Args.
None | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use plib::curuser::login_name() ?
None | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use plib::curuser::tty?
setlocale(LocaleCategory::LcAll, ""); | ||
textdomain(PROJECT_NAME)?; | ||
bind_textdomain_codeset(PROJECT_NAME, "UTF-8")?; | ||
let mut exit_code = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new style: put translation setup before Args parsing.
No description provided.