fix: syntax

This commit is contained in:
Dict Xiong 2026-08-13 16:26:51 +08:00
parent f67ed12e49
commit 41cb0fe549
No known key found for this signature in database
GPG Key ID: 7B97FAAC15EB0628
3 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ _riot_presets() {
[[ -z $DOTFILES ]] || config_files+=("$DOTFILES/riot-config.sh")
config_files+=("$HOME/.config/riot-config.sh" "$PWD/riot-config.sh")
for file in "$config_files[@]"; do
for file in "${config_files[@]}"; do
[[ -r $file ]] || continue
presets+=("${(@f)$(sed -nE 's/^([[:alnum:]_.-]+)\.(remote|batch)\(\).*/\1/p' "$file" 2>/dev/null)}")
done

View File

@ -542,7 +542,7 @@ router() {
local option=""
local remaining=""
local option_value=""
while [[ $# > 0 || -n "$arg" ]]; do
while [[ $# -gt 0 || -n "$arg" ]]; do
if [[ -z "$arg" ]]; then
arg=$1
shift

View File

@ -12,7 +12,7 @@ if [[ "${BASH_SOURCE[0]}" != "${0}" && "$DFS_SKIP_ARG_PARSE" != "1" ]]; then
ORIGIN_ARGS=("$@")
ARG=""
GOT_OPTS=()
while [[ $# > 0 || -n "$ARG" ]]; do
while [[ $# -gt 0 || -n "$ARG" ]]; do
if [[ -z "$ARG" ]]; then
if [[ "$1" == "--" ]]; then GOT_OPTS+=("$@"); break; fi
ARG="$1"; shift;