Merge remote-tracking branch 'krobelus/fix-with-option'
This commit is contained in:
commit
91d6ac013f
|
@ -63,6 +63,7 @@ define-command with-option -params 3.. -docstring %{
|
||||||
evaluate-commands -save-regs s %{
|
evaluate-commands -save-regs s %{
|
||||||
evaluate-commands set-register s %exp{%%opt{%arg{1}}}
|
evaluate-commands set-register s %exp{%%opt{%arg{1}}}
|
||||||
set-option current %arg{1} %arg{2}
|
set-option current %arg{1} %arg{2}
|
||||||
|
try %{
|
||||||
evaluate-commands %sh{
|
evaluate-commands %sh{
|
||||||
shift 2
|
shift 2
|
||||||
for arg
|
for arg
|
||||||
|
@ -70,6 +71,10 @@ define-command with-option -params 3.. -docstring %{
|
||||||
printf "'%s' " "$(printf %s "$arg" | sed "s/'/''/g")"
|
printf "'%s' " "$(printf %s "$arg" | sed "s/'/''/g")"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
} catch %{
|
||||||
|
set-option current %arg{1} %reg{s}
|
||||||
|
fail "with-option: %val{error}"
|
||||||
|
}
|
||||||
set-option current %arg{1} %reg{s}
|
set-option current %arg{1} %reg{s}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user