aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src
diff options
context:
space:
mode:
authorKoichi Murase <myoga.murase@gmail.com>2024-01-10 05:42:27 +0900
committerGitHub <noreply@github.com>2024-01-09 20:42:27 +0000
commitf63f24699e910be41a02682ad4fdd5c25febd0e5 (patch)
treef1683105a06a88210f3c469d07e57bd9b615e10f /docs/src
parentdocs: fix `Destination file already exists` in Nushell (#1530) (diff)
downloadatuin-f63f24699e910be41a02682ad4fdd5c25febd0e5.zip
style(bash): use consistent coding style (#1528)
* style(bash): make indentation consistent Initially, in this file, the first level is indented by four spaces, and additional levels are indented by adding two spaces. However, this does not seem intentional because the other files, such as atuin.zsh, are consistently indented by four spaces for any levels. The indentation was gradually fixed to use four spaces when the relevant code is updated, but there are still remaining parts using two spaces. In this patch, the remaining parts are updated to use the consistent indentation of four spaces. * style(bash): remove extra quotations on rhs of assignments On the right-hand sides of assignments, the quoting of the variable expansions are not needed because they are not subject to the word splitting and the pathname expansions. * style(bash): strip `{` and `}` from `${var}` when not needeed * style(bash): do not use unnecessary quoting in the conditional commands In the conditional commands [[ ... ]], the words are not subject to the word splitting and the pathname expansions, so we do not need to quote the expansions except for the right-hand sides of ==, !=, and =~, where the quoting has a special meaning. In the first place, the syntax [[ .. ]] is introduced to resolve the issue of the quoting, so it is natural to use the unquoted form inside [[ ... ]] by default. In this patch, we use the unquoted form of expansions. * style(bash): prefer [[ $a && ! $b ]] to [[ -n $a && -z $b ]] * style(bash): put "then" in the same line as "if" This is also the format that Bash outputs with `bash --pretty-print FILE` or `declare -f FUNC`.
Diffstat (limited to 'docs/src')
0 files changed, 0 insertions, 0 deletions