Skip to contentSkip to conversation

gitignore: add compile_commands.json

PATCH In review Neehar Vijay 2 participants 4 messages Nov 20, 2022 – Nov 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 gitignore: add compile_commands.json

This file is a compilation command database used by clangd and ccls, and can be generated by tools like https://github.com/rizsotto/Bear.

  $ bear -- make clean all
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index 61b3638d..f215701d 100644
@@ -5,6 +5,7 @@
 .deps
 .dirstamp
 .cache
+compile_commands.json
 tags
 cscope.*
 Makefile
Signature · 1 line
2.38.1
#1 lore raw

PATCH 2/3 gitignore: add .ccls-cache

This directory is used by ccls.

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index f215701d..bc429883 100644
@@ -5,6 +5,7 @@
 .deps
 .dirstamp
 .cache
+.ccls-cache
 compile_commands.json
 tags
 cscope.*
Signature · 1 line
2.38.1
#2 lore raw

PATCH 3/3 client: fix non-interactive mode in some cases

In reply to Neehar Vijay

Before this change, I noticed that some non-interactive commands don't work,

  $ iwctl version
  $ iwctl help

while other ones do.

  $ iwctl station wlan0 show

This seems to be a typo bug in the if clause checking for additional arguments.

---
 client/command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
client/command.c +1 -1
index dbd97703..84be680c 100644
@@ -753,7 +753,7 @@ options_parsed:
 	argv += optind;
 	argc -= optind;
 
-	if (argc < 2) {
+	if (argc < 1) {
 		interactive_mode = true;
 		return false;
 	}
Signature · 1 line
2.38.1