on my way for a new paste, i came over more such unexpected ';' token
errors, yet i seemed for workaround\compatibility to work around em by not
using ; at all, also on end of final done cause that error would appear

im still working on making my code acceptable

On Sat, Nov 14, 2020, 20:29 Alex fxmbsw7 Ratchev <fxmb...@gmail.com> wrote:

> ( http://ix.io/2E6y )
> as.. the +al code worked and the +al alias was defined thru it.. just
> gives the shown ; error on use
>
>    ++ BEGINFILE ii.x7yz.1
>
> i code shortened coding codings, or at least wish to
> here in my x7yz control script i '. -- +al' a ./+al file which then sets 
> aliases by file content, it does so
> but the resulting +al alias of itself says when usage syntax error ';' 
> unexpected
> some other aliases work tho
>
> any ideas ?
>
>    -- ENDFILE ii.x7yz.1   -=| 285 chars 55 words 6 lines
>    ++ BEGINFILE oo.x7yz.4
>
> root@boost:~/x7yz# . x7yz
> root@boost:~/x7yz# type +al
> +al is aliased to `aalres=( ) aalt=
> for caali in "${!aal[@]}" ; do
>  aalres[caali]=$(
>   printf %s "${aal[caali]}="
>   if [[ -f ${aalt:=${aald[caali]:-${aal[caali]}}} ]] ; then
>    exec cat -- "$aalt"
>   else
>    printf -- %s "$aalt"
>   fi
>  ) aalt=
> done
> [[ -v aalres[0] ]] &&
>  alias -- "${aalres[@]}" ; '
> root@boost:~/x7yz# +al
> bash: syntax error near unexpected token `;'
> root@boost:~/x7yz#
>
>    -- ENDFILE oo.x7yz.4   -=| 439 chars 63 words 18 lines
>    ++ BEGINFILE x7yz
>
> #!/bin/bash
> self=${BASH_SOURCE##/*} self=${self+$PWD/$self} self=${self:-$BASH_SOURCE} \
> dir=${self%/*} ; cd "$dir"
> shopt -s extglob globstar expand_aliases
> aal=( +al KWS +kw kwp )
> . -- "$aal"
> KWS
>
>
>    -- ENDFILE x7yz   -=| 198 chars 24 words 8 lines
>    ++ BEGINFILE +al
>
> aalres=( ) aalt=
> for caali in "${!aal[@]}" ; do
>  aalres[caali]=$(
>   printf %s "${aal[caali]}="
>   if [[ -f ${aalt:=${aald[caali]:-${aal[caali]}}} ]] ; then
>    exec cat -- "$aalt"
>   else
>    printf -- %s "$aalt"
>   fi
>  ) aalt=
> done
> [[ -v aalres[0] ]] &&
>  alias -- "${aalres[@]}" ;
>
>    -- ENDFILE +al   -=| 278 chars 42 words 13 lines
>    -- END of 4 pastes ( 1200 chars 184 words 45 lines
>
>
>

Reply via email to