Update CONTRIBUTING.md (#2114)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-08-26 03:29:52 +10:00
1 parent e60c055be3
commit 4384e520b5
1 file changed
+6 -3
+6 -3
View File
@@ -28,7 +28,7 @@ Adding a new option usually requires the following steps:
- Add option evaluation logic to `setExpr.eval` in `eval.go` - Add option evaluation logic to `setExpr.eval` in `eval.go`
- Implement the option somewhere in the code - Implement the option somewhere in the code
- Add option name and its default value to `Quick Reference` and `Options` sections in `doc.md` - Add option name and its default value to `Quick Reference` and `Options` sections in `doc.md`
- Run `gen/doc.sh` to update the documentation (requires podman/docker) - Run `gen/doc.sh` to update the documentation (optional as it requires `docker`/`podman`, but appreciated)
- Commit your changes and send a pull request - Commit your changes and send a pull request
## Adding a new builtin command ## Adding a new builtin command
@@ -40,11 +40,14 @@ Adding a new command usually requires the following steps:
- Implement the command somewhere in the code - Implement the command somewhere in the code
- Add command name to `gCmdWords` in `complete.go` for tab completion - Add command name to `gCmdWords` in `complete.go` for tab completion
- Add command name to `Quick Reference` and `Commands` sections in `doc.md` - Add command name to `Quick Reference` and `Commands` sections in `doc.md`
- Optionally, run `gen/doc.sh` to update the documentation (requires podman/docker) - Run `gen/doc.sh` to update the documentation (optional as it requires `docker`/`podman`, but appreciated)
- Commit your changes and send a pull request - Commit your changes and send a pull request
## Platform specific code ## Platform specific code
There are two files named `os.go` and `os_windows.go` for unix and windows specific code respectively. There are two files named `os.go` and `os_windows.go` for Unix and Windows specific code respectively.
If you add something to either of these files but not the other, you probably break the build for the other platform. If you add something to either of these files but not the other, you probably break the build for the other platform.
If your addition works the same in both platforms, your addition probably belongs to `main.go` instead. If your addition works the same in both platforms, your addition probably belongs to `main.go` instead.
There are also different variants of the `df` functionality provided by `df_openbsd.go`, `df_statfs.go`, `df_statvfs.go` and `df_windows.go`.
Where applicable, ensure that any changes you make are reflected across all of these files for consistency.