diff options
| author | ItsDrike <itsdrike@protonmail.com> | 2024-03-06 13:01:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-06 12:01:04 +0000 |
| commit | 082bf002546cfa7aaa7c5b79b03a1b6dd95454af (patch) | |
| tree | 68a726fcf45e1901a24821d6fcc6386b15c01f48 /hyprpm/src/main.cpp | |
| parent | d6f1b151b2fe85ffbb131cbdd05acefc6a357e81 (diff) | |
hyprpm: Add support for specifying exact git revisions for plugin repo (#4983)
* hyprpm(feat): support specifying exact git revs
* Mention git rev argument in help
* Mention git rev arg is optional
* Wrap text
Diffstat (limited to 'hyprpm/src/main.cpp')
| -rw-r--r-- | hyprpm/src/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/hyprpm/src/main.cpp b/hyprpm/src/main.cpp index 37972443..e40d336d 100644 --- a/hyprpm/src/main.cpp +++ b/hyprpm/src/main.cpp @@ -11,7 +11,8 @@ const std::string HELP = R"#(┏ hyprpm, a Hyprland Plugin Manager ┃ -┣ add [url] → Install a new plugin repository from git +┣ add [url] [git rev] → Install a new plugin repository from git. Git revision +┃ is optional, when set, commit locks are ignored. ┣ remove [url/name] → Remove an installed plugin repository ┣ enable [name] → Enable a plugin ┣ disable [name] → Disable a plugin @@ -77,7 +78,12 @@ int main(int argc, char** argv, char** envp) { return 1; } - return g_pPluginManager->addNewPluginRepo(command[1]) ? 0 : 1; + std::string rev = ""; + if (command.size() >= 3) { + rev = command[2]; + } + + return g_pPluginManager->addNewPluginRepo(command[1], rev) ? 0 : 1; } else if (command[0] == "remove") { if (ARGS.size() < 2) { std::cerr << Colors::RED << "✖" << Colors::RESET << " Not enough args for remove.\n"; |
