From 395146590e2a4cd589c214988db76df9b87fdf4d Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 22:24:33 +0900 Subject: [PATCH 1/9] feat: add shfmt step to GitHub Actions workflow for code formatting --- .github/workflows/test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4884971f..8172e89d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -51,6 +51,9 @@ jobs: exit 1 fi + - name: Run `shfmt` + uses: reviewdog/action-shfmt@v1 + - name: Run unit test run: | ./scripts/run_unit_test.sh From c2e221f0ee62a1ed2eb20aba434825a8ad70ab15 Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 22:26:10 +0900 Subject: [PATCH 2/9] fix: update workflow paths to include all files in .github/workflows directory --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8172e89d..4586b51b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,14 +4,14 @@ on: push: branches: [master] paths: - - ".github/workflows" + - ".github/workflows/**" - "home/**" - "install/**" - "tests/**" pull_request: branches: [master] paths: - - ".github/workflows" + - ".github/workflows/**" - "home/**" - "install/**" - "tests/**" From 279c3970b0150927732f86afed67acb1b2524d25 Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 22:30:05 +0900 Subject: [PATCH 3/9] apply shfmt formatter --- home/dot_bash/server/bashrc | 4 +- home/dot_local/bin/common/executable_cdgwq | 14 ++-- home/dot_local/bin/common/executable_cdw | 22 +++--- home/dot_tmux-powerlinerc | 80 +++++++++++----------- install/common/mise.sh | 4 +- install/macos/common/tmux.sh | 4 +- install/ubuntu/common/kcov.sh | 4 +- install/ubuntu/server/ssh_server.sh | 16 ++--- tests/install/macos/common/iterm2.bats | 4 +- 9 files changed, 75 insertions(+), 77 deletions(-) diff --git a/home/dot_bash/server/bashrc b/home/dot_bash/server/bashrc index 0391f5c1..a2f41ffd 100644 --- a/home/dot_bash/server/bashrc +++ b/home/dot_bash/server/bashrc @@ -1,7 +1,7 @@ #!/usr/bin/env bash if [ "$TERM" = "dumb" ]; then - echo -n + echo -n else - command -v zsh > /dev/null && exec zsh + command -v zsh >/dev/null && exec zsh fi diff --git a/home/dot_local/bin/common/executable_cdgwq b/home/dot_local/bin/common/executable_cdgwq index ddf8b6cb..3dd29863 100644 --- a/home/dot_local/bin/common/executable_cdgwq +++ b/home/dot_local/bin/common/executable_cdgwq @@ -1,13 +1,13 @@ #!/usr/bin/env bash function cdgwq() { - # git 内かどうかをチェック - if ! git rev-parse --is-inside-work-tree &>/dev/null; then - echo "Not inside a git repository." - return 1 - fi - moveto=$(gwq list --json | jq -r '.[].path' | fzf) - cd $moveto + # git 内かどうかをチェック + if ! git rev-parse --is-inside-work-tree &>/dev/null; then + echo "Not inside a git repository." + return 1 + fi + moveto=$(gwq list --json | jq -r '.[].path' | fzf) + cd $moveto } if [ -n "$($SHELL -c "echo ${ZSH_VERSION}")" ]; then diff --git a/home/dot_local/bin/common/executable_cdw b/home/dot_local/bin/common/executable_cdw index 6d1f606a..5b9ee3d7 100644 --- a/home/dot_local/bin/common/executable_cdw +++ b/home/dot_local/bin/common/executable_cdw @@ -1,18 +1,18 @@ #!/usr/bin/env bash function cdw() { - # git 内かどうかをチェック - if ! git rev-parse --is-inside-work-tree &>/dev/null; then - echo "Not inside a git repository." - return 1 - fi + # git 内かどうかをチェック + if ! git rev-parse --is-inside-work-tree &>/dev/null; then + echo "Not inside a git repository." + return 1 + fi - moveto=$(gwq list --json | jq -r 'max_by(.created_at) | .path') - if [ -z "$moveto" ]; then - echo "No recent gwq found." - return 1 - fi - cd $moveto + moveto=$(gwq list --json | jq -r 'max_by(.created_at) | .path') + if [ -z "$moveto" ]; then + echo "No recent gwq found." + return 1 + fi + cd $moveto } if [ -n "$($SHELL -c "echo ${ZSH_VERSION}")" ]; then diff --git a/home/dot_tmux-powerlinerc b/home/dot_tmux-powerlinerc index 202767a3..117b929e 100644 --- a/home/dot_tmux-powerlinerc +++ b/home/dot_tmux-powerlinerc @@ -3,15 +3,15 @@ # Default Theme if patched_font_in_use; then - TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="" - TMUX_POWERLINE_SEPARATOR_LEFT_THIN="" - TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="" - TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="" + TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="" + TMUX_POWERLINE_SEPARATOR_LEFT_THIN="" + TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="" + TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="" else - TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀" - TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮" - TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="▶" - TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="❯" + TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀" + TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮" + TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="▶" + TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="❯" fi TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'235'} @@ -23,38 +23,38 @@ TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SE # Format: segment_name background_color foreground_color [non_default_separator] if [ -z "${SSH_CONNECTION}" ]; then - if [ -z "${TMUX_POWERLINE_LEFT_STATUS_SEGMENTS}" ]; then - TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=( - "tmux_session_info 138 236" - "hostname 250 236" - "xkb_layout 59 111 ${TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}" - "lan_ip 235 138 ${TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}" - ) - fi - if [ -z "${TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS}" ]; then - TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=( - "tmux_mem_cpu_load 236 138 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" - "battery 138 236 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" - "date 250 236 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" - "time 138 236" - ) - fi + if [ -z "${TMUX_POWERLINE_LEFT_STATUS_SEGMENTS}" ]; then + TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=( + "tmux_session_info 138 236" + "hostname 250 236" + "xkb_layout 59 111 ${TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}" + "lan_ip 235 138 ${TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}" + ) + fi + if [ -z "${TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS}" ]; then + TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=( + "tmux_mem_cpu_load 236 138 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" + "battery 138 236 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" + "date 250 236 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" + "time 138 236" + ) + fi else - if [ -z "${TMUX_POWERLINE_LEFT_STATUS_SEGMENTS}" ]; then - TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=( - "tmux_session_info 148 234" - "hostname 198 15" - "xkb_layout 59 111 ${TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}" - "lan_ip 235 136 ${TMUX_POWERLINE_SEPARATOR_RIGHT_THIN}" - ) - fi + if [ -z "${TMUX_POWERLINE_LEFT_STATUS_SEGMENTS}" ]; then + TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=( + "tmux_session_info 148 234" + "hostname 198 15" + "xkb_layout 59 111 ${TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}" + "lan_ip 235 136 ${TMUX_POWERLINE_SEPARATOR_RIGHT_THIN}" + ) + fi - if [ -z "${TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS}" ]; then - TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=( - "tmux_mem_cpu_load 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" - "battery 59 111 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" - "date 198 15 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" - "time 148 234" - ) - fi + if [ -z "${TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS}" ]; then + TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=( + "tmux_mem_cpu_load 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" + "battery 59 111 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" + "date 198 15 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" + "time 148 234" + ) + fi fi diff --git a/install/common/mise.sh b/install/common/mise.sh index 5bf9b0f8..54056a3a 100644 --- a/install/common/mise.sh +++ b/install/common/mise.sh @@ -12,7 +12,7 @@ function install_mise() { # https://mise.run local version="v2025.9.25" local url="https://raw.githubusercontent.com/jdx/mise/refs/tags/${version}/packaging/standalone/install.envsubst" - + export MISE_CURRENT_VERSION="${version}" curl "${url}" | sh @@ -30,5 +30,3 @@ function main() { if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then main fi - - diff --git a/install/macos/common/tmux.sh b/install/macos/common/tmux.sh index e710c339..dd3d1bca 100644 --- a/install/macos/common/tmux.sh +++ b/install/macos/common/tmux.sh @@ -14,9 +14,9 @@ readonly PACKAGES=( ) function install_tmux() { - # On GitHub Actions macOS instances, reinstalling CMake fails. + # On GitHub Actions macOS instances, reinstalling CMake fails. # Implement the following workaround to avoid this issue. - # ref. [macOS] Pinned CMake causes some homebrew installs to fail · Issue #12912 · actions/runner-images https://github.com/actions/runner-images/issues/12912#issuecomment-3240845829 + # ref. [macOS] Pinned CMake causes some homebrew installs to fail · Issue #12912 · actions/runner-images https://github.com/actions/runner-images/issues/12912#issuecomment-3240845829 for package in "${PACKAGES[@]}"; do brew list "${package}" || brew install "${package}" done diff --git a/install/ubuntu/common/kcov.sh b/install/ubuntu/common/kcov.sh index fe918d1f..bb139329 100644 --- a/install/ubuntu/common/kcov.sh +++ b/install/ubuntu/common/kcov.sh @@ -35,9 +35,9 @@ function install_kcov() { local tmp_dir tmp_dir=$(mktemp -d /tmp/kcov-XXXXX) - + local kcov_version="v43" - git clone "${url}" "${tmp_dir}" -b "${kcov_version}" --depth 1 + git clone "${url}" "${tmp_dir}" -b "${kcov_version}" --depth 1 cd "${tmp_dir}" || exit 1 mkdir build && cd build || exit 1 diff --git a/install/ubuntu/server/ssh_server.sh b/install/ubuntu/server/ssh_server.sh index 36ee2a6e..68cc1d1d 100644 --- a/install/ubuntu/server/ssh_server.sh +++ b/install/ubuntu/server/ssh_server.sh @@ -5,36 +5,36 @@ set -Eeuo pipefail if [ "${DOTFILES_DEBUG:-}" ]; then set -x fi - + function install_openssh_server() { # install openssh-server and vim sudo apt-get update && sudo apt-get install --no-install-recommends -y \ vim \ openssh-server } - + function setup_sshd() { sudo mkdir -p /var/run/sshd mkdir -p ${HOME}/.ssh - + sudo sed -i 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && sudo sed -i 's/^#Port 22/Port 22/' /etc/ssh/sshd_config && sudo sed -i 's/^#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' /etc/ssh/sshd_config && sudo sed -i 's/^#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config && sudo sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd - + # check the /etc/ssh/sshd_config sudo /usr/sbin/sshd -t - + # create .ssh/authorized_keys if not exists touch ${HOME}/.ssh/authorized_keys } - + function run_sshd() { # run sshd sudo /usr/sbin/service ssh start } - + function main() { install_openssh_server setup_sshd @@ -45,4 +45,4 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then if [ -f "/.dockerenv" ]; then main fi -fi +fi diff --git a/tests/install/macos/common/iterm2.bats b/tests/install/macos/common/iterm2.bats index f69165a1..69ec9354 100644 --- a/tests/install/macos/common/iterm2.bats +++ b/tests/install/macos/common/iterm2.bats @@ -15,9 +15,9 @@ function teardown() { DOTFILES_DEBUG=1 bash "${SCRIPT_PATH}" [ -e "/Applications/iTerm.app" ] - + # local iterm2_config_path="${HOME%/}/Library/Application Support/iTerm2/DynamicProfiles/hotkey_window.json" # brew instal chezmoi && chezmoi apply "${iterm2_config_path}" - + # [ -L "${iterm2_config_path}" ] } From 039a87a7e8ce4cd1a9dc8eb031a773b59a953b1a Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 22:31:35 +0900 Subject: [PATCH 4/9] feat: add shfmt flags for code formatting in GitHub Actions workflow --- .github/workflows/test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4586b51b..6f627ec9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -53,6 +53,8 @@ jobs: - name: Run `shfmt` uses: reviewdog/action-shfmt@v1 + with: + shfmt_flags: -i 4 -d - name: Run unit test run: | From f9e6e97498bf3aca21676f21a163a84a9406ab07 Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 22:37:52 +0900 Subject: [PATCH 5/9] feat: update shfmt flags to include 'sr' for code formatting --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6f627ec9..577cd20b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -54,7 +54,7 @@ jobs: - name: Run `shfmt` uses: reviewdog/action-shfmt@v1 with: - shfmt_flags: -i 4 -d + shfmt_flags: -i 4 -sr -d - name: Run unit test run: | From 2d04a6121f27a5fddb2efd823717d0866ba29b58 Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 22:38:03 +0900 Subject: [PATCH 6/9] fix: correct path assignment in cuda.sh for proper CUDA bin directory inclusion --- home/dot_local/bin/server/cuda.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/home/dot_local/bin/server/cuda.sh b/home/dot_local/bin/server/cuda.sh index bcaf2835..a0d29c39 100644 --- a/home/dot_local/bin/server/cuda.sh +++ b/home/dot_local/bin/server/cuda.sh @@ -3,9 +3,8 @@ export CUDA_HOME="/usr/local/cuda" typeset -gU path -path=( - $path - ${CUDA_HOME}/bin(N-/) +path+=( + ${CUDA_HOME}/bin ) export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib64" From 7030b8541fd1d75ba5dbacfc8237a6575ccf3a49 Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 22:49:50 +0900 Subject: [PATCH 7/9] Revert "fix: correct path assignment in cuda.sh for proper CUDA bin directory inclusion" This reverts commit 2d04a6121f27a5fddb2efd823717d0866ba29b58. --- home/dot_local/bin/server/cuda.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home/dot_local/bin/server/cuda.sh b/home/dot_local/bin/server/cuda.sh index a0d29c39..bcaf2835 100644 --- a/home/dot_local/bin/server/cuda.sh +++ b/home/dot_local/bin/server/cuda.sh @@ -3,8 +3,9 @@ export CUDA_HOME="/usr/local/cuda" typeset -gU path -path+=( - ${CUDA_HOME}/bin +path=( + $path + ${CUDA_HOME}/bin(N-/) ) export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib64" From c35d462f23e182826a20146a7f016ed79e9b8883 Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Tue, 30 Dec 2025 23:09:06 +0900 Subject: [PATCH 8/9] apply formatter --- home/dot_bash/server/bashrc | 2 +- home/dot_local/bin/client/executable_connect-hosei-vpn | 4 ++-- home/dot_local/bin/common/executable_cdgwq | 2 +- home/dot_local/bin/common/executable_cdw | 2 +- .../bin/common/executable_git-delete-merged-branches | 2 +- home/dot_local/bin/server/history.sh | 2 +- home/dot_local/bin/server/ssh_agent.sh | 4 ++-- install/common/age.sh | 2 +- install/common/tpm.sh | 2 +- install/macos/common/brew.sh | 2 +- install/macos/common/mac_app_store.sh | 2 +- install/macos/common/misc.sh | 2 +- install/ubuntu/client/docker.sh | 4 ++-- scripts/run_benchmark.sh | 2 +- setup.sh | 10 +++++----- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/home/dot_bash/server/bashrc b/home/dot_bash/server/bashrc index a2f41ffd..286bb00a 100644 --- a/home/dot_bash/server/bashrc +++ b/home/dot_bash/server/bashrc @@ -3,5 +3,5 @@ if [ "$TERM" = "dumb" ]; then echo -n else - command -v zsh >/dev/null && exec zsh + command -v zsh > /dev/null && exec zsh fi diff --git a/home/dot_local/bin/client/executable_connect-hosei-vpn b/home/dot_local/bin/client/executable_connect-hosei-vpn index 9c87815f..c10ce94c 100644 --- a/home/dot_local/bin/client/executable_connect-hosei-vpn +++ b/home/dot_local/bin/client/executable_connect-hosei-vpn @@ -4,11 +4,11 @@ readonly HOSEI_VPN_CREDENTIAL_JSON="${HOSEI_VPN_CREDENTIAL_JSON:-${HOME%/}/.conf readonly HOSEI_VPN_HOST="vpn.hosei.ac.jp" function get-username() { - jq <"${HOSEI_VPN_CREDENTIAL_JSON}" -r ".username" + jq < "${HOSEI_VPN_CREDENTIAL_JSON}" -r ".username" } function get-password() { - jq <"${HOSEI_VPN_CREDENTIAL_JSON}" -r ".password" + jq < "${HOSEI_VPN_CREDENTIAL_JSON}" -r ".password" } function connect-hosei-vpn() { diff --git a/home/dot_local/bin/common/executable_cdgwq b/home/dot_local/bin/common/executable_cdgwq index 3dd29863..b7d97df6 100644 --- a/home/dot_local/bin/common/executable_cdgwq +++ b/home/dot_local/bin/common/executable_cdgwq @@ -2,7 +2,7 @@ function cdgwq() { # git 内かどうかをチェック - if ! git rev-parse --is-inside-work-tree &>/dev/null; then + if ! git rev-parse --is-inside-work-tree &> /dev/null; then echo "Not inside a git repository." return 1 fi diff --git a/home/dot_local/bin/common/executable_cdw b/home/dot_local/bin/common/executable_cdw index 5b9ee3d7..85c9db3e 100644 --- a/home/dot_local/bin/common/executable_cdw +++ b/home/dot_local/bin/common/executable_cdw @@ -2,7 +2,7 @@ function cdw() { # git 内かどうかをチェック - if ! git rev-parse --is-inside-work-tree &>/dev/null; then + if ! git rev-parse --is-inside-work-tree &> /dev/null; then echo "Not inside a git repository." return 1 fi diff --git a/home/dot_local/bin/common/executable_git-delete-merged-branches b/home/dot_local/bin/common/executable_git-delete-merged-branches index 7f76945f..da90b077 100644 --- a/home/dot_local/bin/common/executable_git-delete-merged-branches +++ b/home/dot_local/bin/common/executable_git-delete-merged-branches @@ -1,7 +1,7 @@ #!/usr/bin/env bash function is_inside_git_repository() { - git rev-parse --is-inside-work-tree >/dev/null 2>&1 + git rev-parse --is-inside-work-tree > /dev/null 2>&1 } function get_default_branch() { diff --git a/home/dot_local/bin/server/history.sh b/home/dot_local/bin/server/history.sh index db72787c..358fadce 100644 --- a/home/dot_local/bin/server/history.sh +++ b/home/dot_local/bin/server/history.sh @@ -6,7 +6,7 @@ function tac { function share_history { history -a - tac ~/.bash_history | awk '!a[$0]++' | tac >~/.bash_history.tmp + tac ~/.bash_history | awk '!a[$0]++' | tac > ~/.bash_history.tmp [ -f ~/.bash_history.tmp ] && mv ~/.bash_history{.tmp,} && diff --git a/home/dot_local/bin/server/ssh_agent.sh b/home/dot_local/bin/server/ssh_agent.sh index 153d5f2d..c1a30fc4 100644 --- a/home/dot_local/bin/server/ssh_agent.sh +++ b/home/dot_local/bin/server/ssh_agent.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -eval "$(ssh-agent)" >/dev/null 2>&1 -ssh-add "${HOME}/.ssh/id_ed25519" >/dev/null 2>&1 +eval "$(ssh-agent)" > /dev/null 2>&1 +ssh-add "${HOME}/.ssh/id_ed25519" > /dev/null 2>&1 diff --git a/install/common/age.sh b/install/common/age.sh index 0dec66ef..69d9bd85 100644 --- a/install/common/age.sh +++ b/install/common/age.sh @@ -7,7 +7,7 @@ if [ "${DOTFILES_DEBUG:-}" ]; then fi function is_age_installed() { - command -v "age" &>/dev/null + command -v "age" &> /dev/null } function get_chezmoi_home_dir() { diff --git a/install/common/tpm.sh b/install/common/tpm.sh index a3196b57..f019a473 100644 --- a/install/common/tpm.sh +++ b/install/common/tpm.sh @@ -10,7 +10,7 @@ readonly TMUX_PLUGINS_DIR="${HOME%/}/.tmux/plugins" readonly TPM_DIR="${TMUX_PLUGINS_DIR}/tpm" function is_tmux_mem_cpu_load_installed() { - command -v "tmux-mem-cpu-load" &>/dev/null + command -v "tmux-mem-cpu-load" &> /dev/null } function clone_tpm() { diff --git a/install/macos/common/brew.sh b/install/macos/common/brew.sh index 2521b59d..a52dcbf3 100644 --- a/install/macos/common/brew.sh +++ b/install/macos/common/brew.sh @@ -7,7 +7,7 @@ if [ "${DOTFILES_DEBUG:-}" ]; then fi function is_homebrew_exists() { - command -v brew &>/dev/null + command -v brew &> /dev/null } function install_homebrew() { diff --git a/install/macos/common/mac_app_store.sh b/install/macos/common/mac_app_store.sh index 34795fe0..61f6e52d 100644 --- a/install/macos/common/mac_app_store.sh +++ b/install/macos/common/mac_app_store.sh @@ -7,7 +7,7 @@ if [ "${DOTFILES_DEBUG:-}" ]; then fi function is_mas_installed() { - common -v mas &>/dev/null + common -v mas &> /dev/null } function install_mas() { diff --git a/install/macos/common/misc.sh b/install/macos/common/misc.sh index 47dcf3e9..b0cd9c6d 100644 --- a/install/macos/common/misc.sh +++ b/install/macos/common/misc.sh @@ -47,7 +47,7 @@ readonly ADDITIONAL_CASK_PACKAGES=( function is_brew_package_installed() { local package="$1" - brew list "${package}" &>/dev/null + brew list "${package}" &> /dev/null } function install_brew_packages() { diff --git a/install/ubuntu/client/docker.sh b/install/ubuntu/client/docker.sh index f46cc5c8..4fbdd540 100644 --- a/install/ubuntu/client/docker.sh +++ b/install/ubuntu/client/docker.sh @@ -22,7 +22,7 @@ function uninstall_old_docker() { "runc" ) for package in "${packages[@]}"; do - if dpkg -s "${package}" >/dev/null 2>&1; then + if dpkg -s "${package}" > /dev/null 2>&1; then sudo apt-get remove -y "${package}" fi done @@ -45,7 +45,7 @@ function setup_repository() { # Use the following command to set up the repository: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null + $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null } function install_docker_engine() { diff --git a/scripts/run_benchmark.sh b/scripts/run_benchmark.sh index 33a6bfed..21335969 100755 --- a/scripts/run_benchmark.sh +++ b/scripts/run_benchmark.sh @@ -68,7 +68,7 @@ function record_startup_time() { # shellcheck disable=SC2086 average_startup_time=$(cat ${average_file} | awk '{ total += $1 } END { print total/NR }') - cat </dev/null & + done 2> /dev/null & } function keepalive_sudo_macos() { # ref. https://github.com/reitermarkus/dotfiles/blob/master/.sh#L85-L116 ( - builtin read -r -s -p "Password: " "${SUDO_ASKPASS}" + } > "${SUDO_ASKPASS}" /bin/chmod +x "${SUDO_ASKPASS}" export SUDO_ASKPASS - if ! /usr/bin/sudo -A -kv 2>/dev/null; then + if ! /usr/bin/sudo -A -kv 2> /dev/null; then echo -e '\033[0;31mIncorrect password.\033[0m' 1>&2 exit 1 fi @@ -118,7 +118,7 @@ function keepalive_sudo() { function initialize_os_macos() { function is_homebrew_exists() { - command -v brew &>/dev/null + command -v brew &> /dev/null } # Instal Homebrew if needed. From 77e9814b04e2cb54c390bee09e2e24e1613b7762 Mon Sep 17 00:00:00 2001 From: Shunsuke KITADA Date: Wed, 21 Jan 2026 00:16:15 +0900 Subject: [PATCH 9/9] fix: format YAML indentation in GitHub Actions workflow --- .github/workflows/test.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 577cd20b..0c7d5d80 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,17 +4,17 @@ on: push: branches: [master] paths: - - ".github/workflows/**" - - "home/**" - - "install/**" - - "tests/**" + - ".github/workflows/**" + - "home/**" + - "install/**" + - "tests/**" pull_request: branches: [master] paths: - - ".github/workflows/**" - - "home/**" - - "install/**" - - "tests/**" + - ".github/workflows/**" + - "home/**" + - "install/**" + - "tests/**" jobs: test: