mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-28 15:46:35 +01:00
Updated README.md
This commit is contained in:
parent
d677c7cc3b
commit
fdd40730c2
17
README.md
17
README.md
@ -80,16 +80,17 @@ How to add the subfolder Scripts/ to the search path for command-line usage?
|
||||
* **Windows:** open the environment variables dialogue and add the full path to Scripts/ to the system environment variable "Path"
|
||||
* **Bash or sh:** edit .profile in your home directory and add the line: PATH="$PATH:/path/to/PowerShell/Scripts"
|
||||
|
||||
Script Standards
|
||||
Conventions Used
|
||||
----------------
|
||||
Each script should support the following rules:
|
||||
Each PowerShell script should follow the 7 golden rules:
|
||||
|
||||
* **Rule 1:** to support PowerShell on Linux the first line reads: #!/snap/bin/powershell
|
||||
* **Rule 2:** to support PowerShell on Linux the script has execute file permissions (chmod a+rx <file>)
|
||||
* **Rule 3:** add a metadata header containing the syntax, description, author, source, and license
|
||||
* **Rule 4:** prefer command-line options, but may ask the user in case no option is given
|
||||
* **Rule 5:** the encoding of the script is in UTF-8 with BOM to support Unicode characters
|
||||
* **Rule 6:** exit 0 for success, otherwise exit with the error code (mostly 1)
|
||||
* **Rule 1:** the script filename should be named "<verb>-<object>.ps1"
|
||||
* **Rule 2:** to support PowerShell on Linux the first line reads: #!/snap/bin/powershell
|
||||
* **Rule 3:** to support PowerShell on Linux the script has execute file permissions (chmod a+rx <file>)
|
||||
* **Rule 4:** add a metadata header containing the syntax, description, author, source, and license
|
||||
* **Rule 5:** prefer command-line options, but may ask the user in case no option is given
|
||||
* **Rule 6:** the encoding of the script is in UTF-8 with BOM to support Unicode characters
|
||||
* **Rule 7:** exit 0 for success, otherwise exit with the error code (mostly 1)
|
||||
|
||||
Feedback
|
||||
--------
|
||||
|
Loading…
Reference in New Issue
Block a user