From unknown Tue Jun 24 15:44:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37953: tramp: a local bash does not start Resent-From: Koichi Arakawa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2019 00:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37953 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 37953@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157222125032312 (code B ref -1); Mon, 28 Oct 2019 00:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Oct 2019 00:07:30 +0000 Received: from localhost ([127.0.0.1]:43675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOsZG-0008P4-3Q for submit@debbugs.gnu.org; Sun, 27 Oct 2019 20:07:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:44984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOsZD-0008Ox-3i for submit@debbugs.gnu.org; Sun, 27 Oct 2019 20:07:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40399) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOsZC-0000f7-1e for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 20:07:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOsZA-0007cO-Fs for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 20:07:25 -0400 Received: from mo-sw1511.iijmio.jp ([203.180.38.130]:38178 helo=mo-sw.iijmio.jp) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOsZ8-0007ar-5A for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 20:07:24 -0400 DKIM-Signature: v=1;a=rsa-sha256;c=relaxed/simple;d=pp.iij4u.or.jp;h=Date: Message-Id:To:Subject:From:Mime-Version:Content-Type: Content-Transfer-Encoding;i=arakawa@pp.iij4u.or.jp;s=20190530.mm;t= 1572221235; x=1573430835; bh=2qKc1xF8g6WLBnHVNf6gZBbFgNT114pqG5aDu/UOudA=; b=JOy OX+JMnzmf+Sst4TbfbkrEFZ6RXdzDnQM7/Sh/jnJx9Om3Zl5vyVlnnwYST2MFRqBN/G1VujY7iw9S d55+PtXcUI2amhk/pmhC/hYXnOuVZmhre64gtqZVXppQf2QkGUitxWYF7scqgEX7j5dE6DhF5xi7D sl2YFMUDV5QzgXFMaaSW6JoYLfri7cJq22GyducitC8JCK3J5bOTuBCBbrebhiBjN912zdvKMJolz ZxKAyog+vsi+kOrLX/eERDA0qZT4k96TXOMnz04OIoKteT4TF3//F5XdCBs/R/l1R9SaQYaSUanXG hf75cGMNquDM0vfOtqryesbGpqL/I3w==; Received: by mo-sw.iijmio.jp (mio-mo-sw1511) id x9S07Fpi008648; Mon, 28 Oct 2019 09:07:15 +0900 Received: from localhost (corsica.s2factory.co.jp [122.220.15.114]) by mbox.iij4u.or.jp (mio-4u-mbox1510) id x9S07EA5001872 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 28 Oct 2019 09:07:15 +0900 Date: Mon, 28 Oct 2019 09:07:13 +0900 (=?UTF-8?Q?=E6=9D=B1=E4=BA=AC?= (=?UTF-8?Q?=E6=A8=99=E6=BA=96=E6=99=82?=)) Message-Id: <20191028.090713.513463528595593480.arakawa@pp.iij4u.or.jp> From: Koichi Arakawa X-Mailer: Mew version 6.8 on Emacs 27.0 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.180.38.130 X-Spam-Score: -0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) Hi I'm using Emacs in the MSYS2 environment. And the local shell bash depends on the order of its command-line switches. When the last argument is "-i", bash starts normally. >C:/msys64/usr/bin/bash -norc -noprofile -i bash-4.4$ But in another case, it ends with an error. >C:/msys64/usr/bin/bash -i -norc -noprofile /usr/bin/bash: line 0: /usr/bin/bash: -noprofile: invalid option name So I think we need the following patch to fix that. Best regards, Koichi Arakawa --- tramp-sh.el.~1~ 2019-10-20 10:48:27.300959800 +0900 +++ tramp-sh.el 2019-10-28 08:47:12.048207800 +0900 @@ -4877,9 +4877,9 @@ (tramp-get-connection-buffer vec) (append (list tramp-encoding-shell) + (and extra-args (split-string extra-args)) (and tramp-encoding-command-interactive - (list tramp-encoding-command-interactive)) - (and extra-args (split-string extra-args))))))) + (list tramp-encoding-command-interactive))))))) ;; Set sentinel and query flag. Initialize variables. (set-process-sentinel p #'tramp-process-sentinel) From unknown Tue Jun 24 15:44:05 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Koichi Arakawa Subject: bug#37953: closed (Re: bug#37953: tramp: a local bash does not start) Message-ID: References: <87zhhluu3z.fsf@gmx.de> <20191028.090713.513463528595593480.arakawa@pp.iij4u.or.jp> X-Gnu-PR-Message: they-closed 37953 X-Gnu-PR-Package: emacs Reply-To: 37953@debbugs.gnu.org Date: Mon, 28 Oct 2019 08:57:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1572253023-2669-1" This is a multi-part message in MIME format... ------------=_1572253023-2669-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #37953: tramp: a local bash does not start which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 37953@debbugs.gnu.org. --=20 37953: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37953 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1572253023-2669-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 37953-done) by debbugs.gnu.org; 28 Oct 2019 08:56:05 +0000 Received: from localhost ([127.0.0.1]:43803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP0om-0000fl-Vf for submit@debbugs.gnu.org; Mon, 28 Oct 2019 04:56:05 -0400 Received: from mout.gmx.net ([212.227.15.19]:45959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP0ok-0000fF-Lz for 37953-done@debbugs.gnu.org; Mon, 28 Oct 2019 04:56:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572252947; bh=eSvnuFACfBZWJ5kTxlVwYntqVDw5vzGKLawoajF8H70=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=hFz5XLtmtTKzLLa/eJuQ9KEw2cn66vxn1C8XhMlT9bC4P9Y85+TsycT8j4mjEudeb m5f0zaxJDur+qatrLZxWd19sjiNuWsezFkMQp3nab70EM7BSW43xgK+S40sZ+Iwc03 pef7VkY3wAxobhxo1skQYDLbH3MjxPAh2n6zHSq4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.61.205]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MHXFr-1iC4O20Mef-00Dbhe; Mon, 28 Oct 2019 09:55:47 +0100 From: Michael Albinus To: Koichi Arakawa Subject: Re: bug#37953: tramp: a local bash does not start References: <20191028.090713.513463528595593480.arakawa@pp.iij4u.or.jp> Date: Mon, 28 Oct 2019 09:55:44 +0100 In-Reply-To: <20191028.090713.513463528595593480.arakawa@pp.iij4u.or.jp> (Koichi Arakawa's message of "Mon, 28 Oct 2019 09:07:13 +0900 =?utf-8?B?KOadseS6rAko5qiZ5rqW5pmCKSki?=) Message-ID: <87zhhluu3z.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:2E8KXh8Jex5gPwSytSUC/8cMn5Cjao46TsUhOmXd6g/GJSlG9mY GBJ3DFBCIeLjuJbxBKynXMWMeaakLrzPmBSWK/Tfcf5xT8KQi206ftyIolNi9OCkF+NT3NV jAPhK9Dp3xdCyHhhg8vIyO8zbJkkkRrAxbPFOae2hgwKgb8oinRpIXCDGJpPpG3St0ljaZC xJ0UJA0zUGueMYM1YBc2g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Y/q7Lbkj+Lg=:HwB/ZDxno2KxEFXU8vEodE dW7Gqv81r53yE3S5pr88DiBx9XmsoWeEOosI9bK2V+rLHsPPZ/YywnmQOiSP0x0PUQtHjW7xA 0cqpfPtMZmb/mwjnL3PZ3DsNjKEztFcVxFXLeB44uXWtGHn5AmUtJcgY2aB0wRgrUUcmJf7QF sQysRUjYrtx9tYz4dvuQFfHGUBYLO5mk7XOVdFKyh+Fnnl7DiH4+VWL4NLtaZRmp/SqVxJw2W +5a9foEcmLVoL40ewmiNhbfvbI9wvCujvid0pKTTx74m9ZWdyDyNMNoV4cXGUeC9EKHTHZx2G fPwmtpDbHaDISqpBWjuqniBi04ZHMFpYvo4HR1++rarbQCVYDhDVVtgUttYhVkSTnZZEw1hn3 9PnlHXSuh94NHR0H0x9XdXssupdFYeoifuwFGxT8/pXVw7c6lNk47iz5RYFpg/ebZM/O463Jd gNt7pG74AO+LD/qVAhv8/J/n1RUAdvapnffRet+I+6MjT1O9NTrIpz6UWnRLraiHi4pTn579z DrgaoLaBHT2BlKCMU8+e+jBO2454qwOAzP4OxBGFCkt3lnzk0aKPKmgNw9pBcLKnk9WHZG44G pa8kgdEfe+3cyKI65At738Za6d9yDSezwZKxtv6NHXBOS0bZ71MVzwwClnPf6jaK9lpna1H4F DWk1iBK1NH0Fj4LeN6n30okOKp6zGC86bGrRjQzbH8mTc7xWiAXjxOL0eO4RHAP4/AQvcnD66 8qYgPkVoQ/sOUzhYCezWWaKe3mC3+gnx94HswHksJ4jr3CEKsJHK8wfxEOkoZzXJNidFKsZwK q74BjDkxOCAzKi8R2r7246aLr/C1qDS0Wykx8uWr0z0tVqxaIDHC91HClfGSJb4+GzzLelXhH vvG/m10DRemjJPih969cTKA/MfkKDLqqMvm6y19y79pUkul2Mn+nNaeEz2hyeuC1sPS/pqwa5 U2y2LCwbAYM2dzUY9vryU+8MrKStkwMSYFHuppGxvH+IGAgxuAMayoVy6K+UPXy0yInzRxV/x RBPJ7A1MmkeIctAhIaZy2Msr38WKYTO5roUQrE7YXx4S47Q/1x+xfDe34OBrsp3sHmmGhM59T rgZ+wZzoxKhfcnb/I+xUtg4Yee/cAq1o81S1tfWUEtoLrSnL5wEd3ILmOjiCvyQokS/hc8+ZI V7pfyqLLWC6VR4T3VZgY0nRAXJ9el2cWHCvGufeJgHTPHxe1qQvPZCxXLOC9U8alSSVvY/oT+ dAtWR9hxKP2+dFbnmesfknR4jEyDHKJWlimHqnGRwsp4vdRs39MvZ2x1Q07o= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37953-done Cc: 37953-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 27.1 Koichi Arakawa writes: > Hi Hi, > I'm using Emacs in the MSYS2 environment. And the local shell bash > depends on the order of its command-line switches. > > When the last argument is "-i", bash starts normally. > > >C:/msys64/usr/bin/bash -norc -noprofile -i > bash-4.4$ > > But in another case, it ends with an error. > > >C:/msys64/usr/bin/bash -i -norc -noprofile > /usr/bin/bash: line 0: /usr/bin/bash: -noprofile: invalid option name > > So I think we need the following patch to fix that. Thanks for the report, the same error happens on GNU/Linux. So I have applied your patch to the repositories. Closing the bug. > Best regards, > Koichi Arakawa Best regards, Michael. ------------=_1572253023-2669-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Oct 2019 00:07:30 +0000 Received: from localhost ([127.0.0.1]:43675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOsZG-0008P4-3Q for submit@debbugs.gnu.org; Sun, 27 Oct 2019 20:07:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:44984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOsZD-0008Ox-3i for submit@debbugs.gnu.org; Sun, 27 Oct 2019 20:07:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40399) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOsZC-0000f7-1e for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 20:07:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOsZA-0007cO-Fs for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 20:07:25 -0400 Received: from mo-sw1511.iijmio.jp ([203.180.38.130]:38178 helo=mo-sw.iijmio.jp) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOsZ8-0007ar-5A for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 20:07:24 -0400 DKIM-Signature: v=1;a=rsa-sha256;c=relaxed/simple;d=pp.iij4u.or.jp;h=Date: Message-Id:To:Subject:From:Mime-Version:Content-Type: Content-Transfer-Encoding;i=arakawa@pp.iij4u.or.jp;s=20190530.mm;t= 1572221235; x=1573430835; bh=2qKc1xF8g6WLBnHVNf6gZBbFgNT114pqG5aDu/UOudA=; b=JOy OX+JMnzmf+Sst4TbfbkrEFZ6RXdzDnQM7/Sh/jnJx9Om3Zl5vyVlnnwYST2MFRqBN/G1VujY7iw9S d55+PtXcUI2amhk/pmhC/hYXnOuVZmhre64gtqZVXppQf2QkGUitxWYF7scqgEX7j5dE6DhF5xi7D sl2YFMUDV5QzgXFMaaSW6JoYLfri7cJq22GyducitC8JCK3J5bOTuBCBbrebhiBjN912zdvKMJolz ZxKAyog+vsi+kOrLX/eERDA0qZT4k96TXOMnz04OIoKteT4TF3//F5XdCBs/R/l1R9SaQYaSUanXG hf75cGMNquDM0vfOtqryesbGpqL/I3w==; Received: by mo-sw.iijmio.jp (mio-mo-sw1511) id x9S07Fpi008648; Mon, 28 Oct 2019 09:07:15 +0900 Received: from localhost (corsica.s2factory.co.jp [122.220.15.114]) by mbox.iij4u.or.jp (mio-4u-mbox1510) id x9S07EA5001872 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 28 Oct 2019 09:07:15 +0900 Date: Mon, 28 Oct 2019 09:07:13 +0900 =?iso-2022-jp?B?KBskQkVsNX4bKEIgKBskQkk4PWA7fhsoQikp?= Message-Id: <20191028.090713.513463528595593480.arakawa@pp.iij4u.or.jp> To: bug-gnu-emacs@gnu.org Subject: tramp: a local bash does not start From: Koichi Arakawa X-Mailer: Mew version 6.8 on Emacs 27.0 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.180.38.130 X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) Hi I'm using Emacs in the MSYS2 environment. And the local shell bash depends on the order of its command-line switches. When the last argument is "-i", bash starts normally. >C:/msys64/usr/bin/bash -norc -noprofile -i bash-4.4$ But in another case, it ends with an error. >C:/msys64/usr/bin/bash -i -norc -noprofile /usr/bin/bash: line 0: /usr/bin/bash: -noprofile: invalid option name So I think we need the following patch to fix that. Best regards, Koichi Arakawa --- tramp-sh.el.~1~ 2019-10-20 10:48:27.300959800 +0900 +++ tramp-sh.el 2019-10-28 08:47:12.048207800 +0900 @@ -4877,9 +4877,9 @@ (tramp-get-connection-buffer vec) (append (list tramp-encoding-shell) + (and extra-args (split-string extra-args)) (and tramp-encoding-command-interactive - (list tramp-encoding-command-interactive)) - (and extra-args (split-string extra-args))))))) + (list tramp-encoding-command-interactive))))))) ;; Set sentinel and query flag. Initialize variables. (set-process-sentinel p #'tramp-process-sentinel) ------------=_1572253023-2669-1--