From: dbe AT wgn DOT net ("$Bill Luebkert") Subject: Re: latest coolview.tar.gz from Sergey... 23 Jul 1997 01:11:10 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <33D5B714.358C.cygnus.gnu-win32@wgn.net> References: <2 DOT 2 DOT 32 DOT 19970723032846 DOT 009439e8 AT ma DOT ultranet DOT com> Reply-To: dbe AT wgn DOT net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (Win95; I) Original-To: Larry Hall Original-CC: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Larry Hall wrote: > If you create bash functions to supplement > your aliases, be careful! I'm not sure why but I just found out that a > bash function defined on 1 line generated a syntax error at the end of > the file it was included in when I sourced it. The specific error was > > bash.EXE: /users/lhall/.bash_alias: line 35: syntax error: unexpected end of > file > > This was hard to track down. The line that caused it was: > > viw() { start vim.exe "$*" } > > changing it to > > viw() > { > start vim.exe "$*" > } > > solved the problem for me. I don't know why or if this is an issue of > general concern. This works (if that helps any): viw() { start vim.exe "$*"; } Maybe bash needs a either a newline or a ; to terminate the line. Just read the man page a bit on lists: Lists A list is a sequence of one or more pipelines separated by one of the operators ;, &, &&, or ||, and terminated by one of ;, &, or . and functions: [ function ] name () { list; } This defines a function named name. The body the function is the list of commands between { a }. This list is executed whenever name is spec fied as the name of a simple command. The ex status of a function is the exit status of the la command executed in the body. (See FUNCTIO below.) -- ,-/- __ _ _ $Bill Luebkert (_/ / ) // // DBE Collectibles / ) /--< o // // http://www.wgn.net/~dbe/ -/-' /___/_<_