zsh-users
 help / color / mirror / code / Atom feed
* Use of == in functions
@ 2020-01-12  8:34 Frank Gallacher
  2020-01-12 10:09 ` Kusalananda Kähäri
       [not found] ` <20200112100906.GA95942__47727.4053309642$1578823915$gmane$org@pooh.prefix.duckdns.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Frank Gallacher @ 2020-01-12  8:34 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

I am converting my functions from bash to zsh, when I do something like:


ciao.old () {
	if [ $# == 0 ]
	then
		PARM="-h" 
	else
		PARM=$* 
	fi


I get an error like:

% ciao.old          
ciao.old:8: = not found


Using the old FORTRAN syntax, Replacing == with -eq fixes the problem; is this a bug, or just being tricky???

TIA, Frankie G.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-12 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12  8:34 Use of == in functions Frank Gallacher
2020-01-12 10:09 ` Kusalananda Kähäri
2020-01-12 10:33   ` SUMMARY " Frank Gallacher
     [not found] ` <20200112100906.GA95942__47727.4053309642$1578823915$gmane$org@pooh.prefix.duckdns.org>
2020-01-12 12:03   ` Stephane Chazelas
2020-01-12 13:58     ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).