「DeveloperWiki:Bash コーディングスタイル」の版間の差分
ナビゲーションに移動
検索に移動
(セクション見出しの訳出) |
(前書きの訳出) |
||
| 1行目: | 1行目: | ||
[[カテゴリ:Arch 開発]] |
[[カテゴリ:Arch 開発]] |
||
[[en:DeveloperWiki:Bash Coding Style]] |
[[en:DeveloperWiki:Bash Coding Style]] |
||
| + | {{Note|このページのスタイルは Arch Linux ソフトウェアプロジェクトに適用されるもので、ArchWiki ページのコードスニペットに適用されるものではありません。}} |
||
| − | {{Note|The style on this page applies to Arch Linux software projects, not code snippets on ArchWiki articles.}} |
||
== ポリシー == |
== ポリシー == |
||
2020年5月8日 (金) 10:55時点における版
ポリシー
- encoding is utf-8
- use
#!/bin/bash - indent with tabs
- tabs have 8 characters
- do not use more than 132 columns
- opening braces are top right, closing are bottom left:
foo() {
echo bar
}
ifandforstatements are like this:
if true; then
do something
else
do something else
fi
for i in a b c; do
echo $i
done
- use single quotes if a string does not contain parseable content
- use
sourceinstead of. - use
$()instead of``