[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
another bug with the alias bug style but for . source .. ?
From: |
Alex fxmbsw7 Ratchev |
Subject: |
another bug with the alias bug style but for . source .. ? |
Date: |
Sat, 21 Nov 2020 23:35:28 +0100 |
( same text as http://ix.io/2F0B )
im over this bug while i got errors from aliases, now tried . source but ..
here another bug ?
++ BEGINFILE ../ii.x7yz.source-err
i source there the init script
then it runs, and for the first part it works, but on the second with
aixz= .. non existing .. it runs just as it wasnt set at all
(
++ alxz=("$x7yzd"/asdd)
++ . -- /root/x7yzd/+ixz
+++ aixzi=-1
+++ [[ -v aixz[++aixzi] ]]
+++ aixzf=/root/x7yzd/+ixz
)
by initial:
(
++ aixz=("$x7yzd"/+{ixz,kw})
++ . -- /root/x7yzd/+ixz
+++ aixzi=-1
+++ [[ -v aixz[++aixzi] ]]
)
this bug i discovered while trying to workaround the alias bugs that
make unknown token ';' or && or ( appear
in the x7yz init code i've initially tried as second run aixz=(
"$x7yzd"/!(+@(ixz|kw)) ) and use +ixz alias, but as it returned same
behavior as i posted above i tried it so, and still failed
additional files than the two in question by request
hope for help
thank you // xmb
-- sorry to explain the thing to you, shortened coding, ./x7yz is the
init script, +ixz adds by 'ixz' structure aliases or keywords ( kw
keyword array system, .. another paste .. )
root@boost:~/x7yzd# . x7yz
+ . x7yz
++ x7yz=x7yz
++ x7yz=/root/x7yzd/x7yz
++ x7yz=/root/x7yzd/x7yz
++ x7yzd=/root/x7yzd
++ shopt -s extglob globstar expand_aliases
++ aixz=("$x7yzd"/+{ixz,kw})
++ . -- /root/x7yzd/+ixz
+++ aixzi=-1
+++ [[ -v aixz[++aixzi] ]]
+++ aixzf=/root/x7yzd/+ixz
+++ aixzn=+ixz
+++ [[ -e /root/x7yzd/+ixz ]]
+++ [[ +ixz == *, ]]
+++ [[ -d /root/x7yzd/+ixz ]]
+++ [[ +ixz == *. ]]
+++ [[ /root/x7yzd/+ixz == *= ]]
+++ [[ -f /root/x7yzd/+ixz= ]]
+++ alias -- '+ixz=
. -- '\''/root/x7yzd/+ixz'\''
'
+++ [[ -v aixz[++aixzi] ]]
+++ aixzf=/root/x7yzd/+kw
+++ aixzn=+kw
+++ [[ -e /root/x7yzd/+kw ]]
+++ [[ +kw == *, ]]
+++ [[ -d /root/x7yzd/+kw ]]
+++ [[ +kw == *. ]]
+++ [[ /root/x7yzd/+kw == *= ]]
+++ [[ -f /root/x7yzd/+kw= ]]
+++ alias -- '+kw=
. -- '\''/root/x7yzd/+kw'\''
'
+++ [[ -v aixz[++aixzi] ]]
++ alxz=("$x7yzd"/asdd)
++ . -- /root/x7yzd/+ixz
+++ aixzi=-1
+++ [[ -v aixz[++aixzi] ]]
+++ aixzf=/root/x7yzd/+ixz
+++ aixzn=+ixz
+++ [[ -e /root/x7yzd/+ixz ]]
+++ [[ +ixz == *, ]]
+++ [[ -d /root/x7yzd/+ixz ]]
+++ [[ +ixz == *. ]]
+++ [[ /root/x7yzd/+ixz == *= ]]
+++ [[ -f /root/x7yzd/+ixz= ]]
+++ alias -- '+ixz=
. -- '\''/root/x7yzd/+ixz'\''
'
+++ [[ -v aixz[++aixzi] ]]
+++ aixzf=/root/x7yzd/+kw
+++ aixzn=+kw
+++ [[ -e /root/x7yzd/+kw ]]
+++ [[ +kw == *, ]]
+++ [[ -d /root/x7yzd/+kw ]]
+++ [[ +kw == *. ]]
+++ [[ /root/x7yzd/+kw == *= ]]
+++ [[ -f /root/x7yzd/+kw= ]]
+++ alias -- '+kw=
. -- '\''/root/x7yzd/+kw'\''
'
+++ [[ -v aixz[++aixzi] ]]
++ KWS
bash: KWS: command not found
root@boost:~/x7yzd#
-- ENDFILE ../ii.x7yz.source-err -=| 2502 chars 428 words 95 lines
++ BEGINFILE x7yz
#!/bin/bash --init-file
x7yz=${BASH_SOURCE##/*} x7yz=${x7yz:+$PWD/$x7yz}
x7yz=${x7yz:-$BASH_SOURCE} x7yzd=${x7yz%/*}
shopt -s extglob globstar expand_aliases
aixz=( "$x7yzd"/+{ixz,kw} )
. -- "$aixz"
alxz=( "$x7yzd"/asdd )
. -- "$x7yzd"/+ixz
KWS
-- ENDFILE x7yz -=| 249 chars 24 words 12 lines
++ BEGINFILE +ixz
aixzi=-1
while [[ -v aixz[++aixzi] ]]
do aixzf=${aixz[aixzi]} aixzn=${aixzf##*/}
if ! [[ -e $aixzf ]]
then continue
fi
if [[ $aixzn == *, ]]
then continue
fi
if [[ -d $aixzf ]]
then aixz+=( "$aixzf"/* )
continue
fi
if [[ $aixzn == *. ]]
then aixzn=${aixzn%.}
if [[ $aixzn == *. ]]
then continue
fi
if [[ -f $aixzf. ]]
then akwt=$( < "$aixzf". )
else akwt=0
fi
if [[ -f $aixzf.. ]]
then mapfile -d '' -t akw <"$aixzf"..
else akw=( "$aixzn" )
fi
akwc=$( < "$aixzf" ) +kw
else
if [[ $aixzf == *= ]]
then continue
fi
if [[ -f $aixzf= ]]
then alias -- "$( < "$aixzf"= )"=$'\n. -- '"${aixzf@Q}"$'\n '
else alias -- "$aixzn="$'\n. -- '"${aixzf@Q}"$'\n '
fi
fi
done
-- ENDFILE +ixz -=| 721 chars 125 words 45 lines
-- END of 3 pastes ( 3472 chars 577 words 152 lines
- another bug with the alias bug style but for . source .. ?,
Alex fxmbsw7 Ratchev <=