「DeveloperWiki:Bash コーディングスタイル」の版間の差分
表示
削除された内容 追加された内容
前書きの訳出 |
Kusanaginoturugi (トーク | 投稿記録) アーカイブ化 タグ: 新規リダイレクト |
||
| (他の1人の利用者による、間の1版が非表示) | |||
| 1行目: | 1行目: | ||
[[カテゴリ:Arch 開発]] |
|||
[[en:DeveloperWiki:Bash Coding Style]] |
|||
{{Note|このページのスタイルは Arch Linux ソフトウェアプロジェクトに適用されるもので、ArchWiki ページのコードスニペットに適用されるものではありません。}} |
|||
#redirect [[ArchWiki:アーカイブ]] |
|||
== ポリシー == |
|||
[[Category:アーカイブ]] |
|||
* encoding is utf-8 |
|||
* use {{ic|#!/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: |
|||
<pre> |
|||
foo() { |
|||
echo bar |
|||
} |
|||
</pre> |
|||
* {{ic|if}} and {{ic|for}} statements are like this: |
|||
<pre> |
|||
if true; then |
|||
do something |
|||
else |
|||
do something else |
|||
fi |
|||
</pre> |
|||
<pre> |
|||
for i in a b c; do |
|||
echo $i |
|||
done |
|||
</pre> |
|||
* use single quotes if a string does not contain parseable content |
|||
* use {{ic|source}} instead of {{ic|.}} |
|||
* use {{ic|$()}} instead of {{ic|``}} |
|||
2023年9月2日 (土) 18:10時点における最新版
転送先: