File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -129,9 +129,10 @@ int qs_main(int argc, char** argv) {
129129 ->needs (debugPortArg);
130130
131131 // / ---
132- bool sparseLogsOnly = false ;
132+ auto sparseLogsOnly = false ;
133133 app.add_flag (" --info" , printInfo, " Print information about the shell" )->excludes (debugPortArg);
134134 app.add_flag (" --no-color" , noColor, " Do not color the log output. (Env:NO_COLOR)" );
135+ auto * printVersion = app.add_flag (" -V,--version" , " Print quickshell's version, then exit." );
135136
136137 app.add_flag (
137138 " --no-detailed-logs" ,
@@ -163,7 +164,10 @@ int qs_main(int argc, char** argv) {
163164 // Start log manager - has to happen with an active event loop or offthread can't be started.
164165 LogManager::init (!noColor, sparseLogsOnly);
165166
166- if (*readLog) {
167+ if (*printVersion) {
168+ std::cout << " quickshell pre-release, revision: " << GIT_REVISION << std::endl;
169+ return 0 ;
170+ } if (*readLog) {
167171 auto file = QFile (*logPath);
168172 if (!file.open (QFile::ReadOnly)) {
169173 qCritical () << " Failed to open log for reading:" << *logPath;
You can’t perform that action at this time.
0 commit comments