mirror of
https://github.com/jimeh/dotify.git
synced 2026-02-19 10:06:39 +00:00
Improve command parsing logic
This commit is contained in:
@@ -93,7 +93,11 @@ fi
|
||||
|
||||
# Command is first argument that does not start with a dash or plus.
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" != "-"* ]] && [[ "$arg" != "+"* ]]; then
|
||||
if [ -n "$skip_next" ]; then
|
||||
skip_next=
|
||||
elif [[ "$arg" =~ ^(--dotfile|-f|--taraget|-t)$ ]]; then
|
||||
skip_next=1
|
||||
elif [[ "$arg" != "-"* ]] && [[ "$arg" != "+"* ]]; then
|
||||
command="$arg"
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user