Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Perl replacement challenge



On Oct 29, 10:19am, ramos@xxxxxxxxxxxxxxxxxxxx wrote:
} Subject: Perl replacement challenge
}
} I have a very simple and effective solution:
} 
} 	# Use "kshdot some_ksh_script" instead of ". some_ksh_script"
} 
} 	kshdot() { source =(ksh -c ". $* 1>&2; senv") }

First question:  Have you tried

	kshdot() {
	  emulate -R ksh
	  setopt localoptions
	  . $*
	}

Second question:  If zsh's ksh emulation isn't good enough, what about

	kshdot() {
	  setopt localoptions allexport
	  source =(ksh -c ". $* 1>&2; export")
	}

I'm assuming that ksh's "export" works much like zsh's; I don't have a
copy of ksh to try it.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author