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

[newgrp] full implementation #347

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Wandalen
Copy link
Contributor

No description provided.

@Wandalen Wandalen marked this pull request as draft October 19, 2024 07:07
@Wandalen Wandalen marked this pull request as ready for review October 19, 2024 07:35
@Wandalen
Copy link
Contributor Author

@jgarzik ready for review

Copy link
Contributor

@jgarzik jgarzik left a 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"
Copy link
Contributor

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,
}
Copy link
Contributor

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
}
}
}
Copy link
Contributor

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
}
}
}
Copy link
Contributor

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;
Copy link
Contributor

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.

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