Return-Path: X-Original-To: apmail-groovy-users-archive@minotaur.apache.org Delivered-To: apmail-groovy-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32238184C9 for ; Fri, 5 Feb 2016 02:14:02 +0000 (UTC) Received: (qmail 28605 invoked by uid 500); 5 Feb 2016 02:13:52 -0000 Delivered-To: apmail-groovy-users-archive@groovy.apache.org Received: (qmail 28572 invoked by uid 500); 5 Feb 2016 02:13:52 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 28562 invoked by uid 99); 5 Feb 2016 02:13:52 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Feb 2016 02:13:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2F6A3C0699 for ; Fri, 5 Feb 2016 02:13:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Z5zG_ah0EEfR for ; Fri, 5 Feb 2016 02:13:51 +0000 (UTC) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.180]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 320BE20D55 for ; Fri, 5 Feb 2016 02:13:51 +0000 (UTC) Received: by mail-io0-f180.google.com with SMTP id g73so114549788ioe.3 for ; Thu, 04 Feb 2016 18:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=thyp4aFWKo8x3vykC/0wklTcD4mOqQBbwqD1edpD36c=; b=yUmceieOn95QC20uVB3lqv0sRmvKhB6xZQy22RsoIf60uCXtc5wWL6ASXlQBbObl9P BF0hH0oqgnaWfG5B+aSkfd+HkyxlwoVQZ45VgaSkUPt//YktHlTppvGdlcdgNyy+Kny0 SfmltsJ7Gi5Kn+FtmzNpsP9t5cDYcc4gxY1Tl05SmC5SBnvmm/JwFKWbNOeyJgKgPJBP 31B/qhgFC2ln/Cb/WJ6nTOqqiHlYfec8GzwSBfkSifBdPankh/3ek/V+drUhIRRnsDYY KqpiWhrzRr2PmJMJVFyRsefliQ0kgEN1Sc8LreMLVCtu3YNPqNGzTueSldI3Jd8uo+Pp WDWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=thyp4aFWKo8x3vykC/0wklTcD4mOqQBbwqD1edpD36c=; b=cHKqwI9gd5B5SzNeOzpRwGYXQHb1Zj+V7bqmU1/+DuCBp9RI2rajOnmG1LSsmqGczb 7MVGhOYLnp5rA5QqKOs2BCUlnD8g6wH+zei/tZ6Io8VPqpNoZCO7/+N+RfZKdKjHFUH3 dVwwRk8GrqDgNPbwkJ7oxYlIcaO2GPQ6O0+XLXMnBKf5zTr0BScQE8igsn1bRTIRa2CJ mftwsQ9+qZMyNk1yz+OLz7PnsTJdsRlYdujtgSKPlTyC6OkAIqApk7byosxLTMsnxgzf TnxTU37uxnbrchQbnpZZiGw+u8JGzErJl6vkq9YAic4q3h0orSFft/t49at/qyXJ5p6q A9Pw== X-Gm-Message-State: AG10YOR7jE8KfhSJAzEtwi+Oz/JdrSBDb1ZwNDiSyom2TXDozFU98Y3+tCkGXoAhqDpkOGvNbsPJgv3b1rw5JA== MIME-Version: 1.0 X-Received: by 10.107.15.196 with SMTP id 65mr13668126iop.48.1454638430712; Thu, 04 Feb 2016 18:13:50 -0800 (PST) Received: by 10.107.11.137 with HTTP; Thu, 4 Feb 2016 18:13:50 -0800 (PST) Date: Thu, 4 Feb 2016 18:13:50 -0800 Message-ID: Subject: Groovysh in non-interactive mode From: cyprushelp To: users@groovy.apache.org Content-Type: multipart/alternative; boundary=001a113fec6cf080af052afc66b2 --001a113fec6cf080af052afc66b2 Content-Type: text/plain; charset=UTF-8 Hello, Groovysh no longer works in non-interactive mode. 1) Before Groovy 2.4, you could run groovysh in non-interactive mode. It would execute the action and then quit. This made it useful when embedding in shell scripts etc. 2) Before Groovy 2.4, you could pass arguments to groovysh in non-interactive mode. For example, I had some custom commands which I could execute not only from within the shell, but also outside of the shell. Both these features seem to be gone in latest Groovy 2.4.5 release. They were useful and a lot of code depended on them. I wonder if someone has any workarounds. I am not sure if the changes in https://issues.apache.org/jira/browse/GROOVY-6754 caused this. Before (groovy 2.3.9): user@machine:~$ groovysh :show all No variables defined No classes have been loaded No custom imports have been defined Preferences: verbose=false ===> [null, null, null, null] user@machine:~$ After (groovy 2.4.5): user@machine:~/opt/groovy-2.4.5/bin$ ./groovysh :show all Groovy Shell (2.4.5, JVM: 1.8.0_51) Type ':help' or ':h' for help. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ groovy:000> :load :show File not found: ":show" groovy:000> :load all File not found: "all" groovy:000> --001a113fec6cf080af052afc66b2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

Groovysh no longer works in non-in= teractive mode.

1) Before Groovy 2.4, you could run groovysh in non-interactive mode. It=20 would execute the action and then quit. This made it useful when=20 embedding in shell scripts etc.
2) Before Groovy 2.4, you=20 could pass arguments to groovysh in non-interactive mode. For example, I had some custom commands which I could execute not only from within the shell, but also outside of the shell.

Both these=20 features seem to be gone in latest Groovy 2.4.5 release. They were=20 useful and a lot of code depended on them. I wonder if someone has any=20 workarounds. I am not sure if the changes in https://issues.apache.org= /jira/browse/GROOVY-6754 caused this.

Before (groovy = 2.3.9):
user@machine:~$ groovysh :show all
No variables defined
No= classes have been loaded
No custom imports have been defined
Prefere= nces:
=C2=A0=C2=A0=C2=A0 verbose=3Dfalse
=3D=3D=3D> [null, null, n= ull, null]
user@machine:~$

After (groovy 2.4.5):
user@m= achine:~/opt/groovy-2.4.5/bin$ ./groovysh :show all
Groovy Shell (2.4.5,= JVM: 1.8.0_51)
Type ':help' or ':h' for help.
------= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------------------------------------
groovy:000> :load :s= how
File not found: ":show"
groovy:000> :load all
Fil= e not found: "all"
groovy:000>
--001a113fec6cf080af052afc66b2--