Open ChillerDragon opened 7 months ago
The actual implementation is unclear. Maybe a collection of scripts that generate json or csv files with tables showing which cli flag was added in which version. And then a github pipeline for mac/linux ensuring that all flags works as promised.
So first start by collecting the data. A front end can come later. It could possibly integrate in a linter or some other development tooling. Or there could be a web page similar to caniuse.com.
Check full man page history of all common commands and grep for deprecated
For example adduser's --gecos
https://youtube.com/shorts/UQlbe6Rg93I?si=ONRTJrbc-1ZoIk5U
killall
might kill all xd
There is caniuse.com for web stating which browsers support what flags. This repo should start the same collection stating which cli tools support what flags in which versions and implemenations.
For example git --xyz was implemented in version xyz Or cut --xyz from coreutils works different in macOS than gnu linux
It can then suggest a version guard if statement at the top of the file
There could also be a mention of a stricter usage of tools. Ideally you never launch
git
but only ever absolute paths such as/bin/git
So the tool version does not change during the runtime of the script.Such as things appearing in PATH or being removed. Due to shims being activated. PATH being edited. Or current working directory being changed.