mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-08-25 16:36:52 +08:00
fix: syntax
This commit is contained in:
parent
f67ed12e49
commit
41cb0fe549
@ -80,7 +80,7 @@ _riot_presets() {
|
|||||||
|
|
||||||
[[ -z $DOTFILES ]] || config_files+=("$DOTFILES/riot-config.sh")
|
[[ -z $DOTFILES ]] || config_files+=("$DOTFILES/riot-config.sh")
|
||||||
config_files+=("$HOME/.config/riot-config.sh" "$PWD/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
|
[[ -r $file ]] || continue
|
||||||
presets+=("${(@f)$(sed -nE 's/^([[:alnum:]_.-]+)\.(remote|batch)\(\).*/\1/p' "$file" 2>/dev/null)}")
|
presets+=("${(@f)$(sed -nE 's/^([[:alnum:]_.-]+)\.(remote|batch)\(\).*/\1/p' "$file" 2>/dev/null)}")
|
||||||
done
|
done
|
||||||
|
|||||||
@ -542,7 +542,7 @@ router() {
|
|||||||
local option=""
|
local option=""
|
||||||
local remaining=""
|
local remaining=""
|
||||||
local option_value=""
|
local option_value=""
|
||||||
while [[ $# > 0 || -n "$arg" ]]; do
|
while [[ $# -gt 0 || -n "$arg" ]]; do
|
||||||
if [[ -z "$arg" ]]; then
|
if [[ -z "$arg" ]]; then
|
||||||
arg=$1
|
arg=$1
|
||||||
shift
|
shift
|
||||||
|
|||||||
@ -12,7 +12,7 @@ if [[ "${BASH_SOURCE[0]}" != "${0}" && "$DFS_SKIP_ARG_PARSE" != "1" ]]; then
|
|||||||
ORIGIN_ARGS=("$@")
|
ORIGIN_ARGS=("$@")
|
||||||
ARG=""
|
ARG=""
|
||||||
GOT_OPTS=()
|
GOT_OPTS=()
|
||||||
while [[ $# > 0 || -n "$ARG" ]]; do
|
while [[ $# -gt 0 || -n "$ARG" ]]; do
|
||||||
if [[ -z "$ARG" ]]; then
|
if [[ -z "$ARG" ]]; then
|
||||||
if [[ "$1" == "--" ]]; then GOT_OPTS+=("$@"); break; fi
|
if [[ "$1" == "--" ]]; then GOT_OPTS+=("$@"); break; fi
|
||||||
ARG="$1"; shift;
|
ARG="$1"; shift;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user