help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request : at ' unexpected end of fille ' error msg append al


From: Greg Wooledge
Subject: Re: feature request : at ' unexpected end of fille ' error msg append also the still-open direcrive
Date: Wed, 21 Aug 2024 11:28:13 -0400

On Wed, Aug 21, 2024 at 15:51:34 +0200, alex xmb sw ratchev wrote:
> i copied problematic script
> removed one cryptic function
> and looks not complicated anymore ..
> 
> shopt ..
> aliases_array=( .. )
> alias -- thatarray@
> func check
> check && run
> 
> thats the last elem in the array
> run=" $* "
> .. the problemic ( when run )
> ( is the only element that uses any $ dollarsign var , others are like
> plain text )
> 
> bash empty_alias_error.bash  # to run
> 
> empty_alias_error.bash: line 39: syntax error: unexpected end of file

Here's an even simpler reproducer:

hobbit:~$ ./foo
./foo: line 5: syntax error: unexpected end of file
hobbit:~$ cat foo
#!/bin/bash
shopt -s expand_aliases
alias run='  '
true && run

The "true &&" is required.  If the final line is "run", there is no error
message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]