mirror of
https://github.com/notwa/rc
synced 2025-03-14 06:02:50 -07:00
simplify code
This commit is contained in:
parent
6244c67e24
commit
f06ed0b0bb
1 changed files with 1 additions and 2 deletions
|
@ -10,8 +10,7 @@ v_domap() {
|
||||||
local _k_="$1" _v_= _new_= _next_= _i_= _o_=
|
local _k_="$1" _v_= _new_= _next_= _i_= _o_=
|
||||||
eval "_v_=\"\$$_k_\""
|
eval "_v_=\"\$$_k_\""
|
||||||
while [ -n "$_v_" ]; do
|
while [ -n "$_v_" ]; do
|
||||||
_next_="${_v_#[! ]}"
|
_next_="${_v_#?}"
|
||||||
[ "$_next_" != "$_v_" ] || _next_="${_v_# }"
|
|
||||||
_i_="${_v_%"$_next_"}"; _v_="$_next_"
|
_i_="${_v_%"$_next_"}"; _v_="$_next_"
|
||||||
map
|
map
|
||||||
_new_="$_new_$_o_"
|
_new_="$_new_$_o_"
|
||||||
|
|
Loading…
Add table
Reference in a new issue