matkv.dev


TIL - Today I Learned

Asking for user input in a VSCode launch.json file
21 Apr 2025

While playing around with Zig (not that I’m actually going to try and learn it anytime soon I think) I had GitHub copilot generate the launch,json file for a little hello world app. Apparently you can ask for user input directly this way:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "lldb",
      "request": "launch",
      "name": "Debug Zig Executable",
      "program": "${workspaceFolder}/zig-out/bin/${input:executableName}",
      "preLaunchTask": "build",
      "args": [],
      "cwd": "${workspaceFolder}"
    }
  ],
  "inputs": [
    {
      "type": "promptString",
      "id": "executableName",
      "description": "Enter the name of the executable to debug (e.g., zig_hello_world)"
    }
  ]
}

When pressing F5, a little dialogue pops up and asks you to input some text which is then used in the config. Pretty neat.

Multiple authors in a git commit
22 Mar 2025

It is possible to add multiple authors to one git commit on Github.

You just need to add “Co-authored-by” to the end of the commit message followed by the co-authors’ name and email address. This works for multiple co-authors.

git commit -m "Your commit message" -m "Co-authored-by: Name <email>"

This will then show up in the commit history on Github. I don’t think it works on Azure DevOps.