From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#63539: 29.0.90; TRAMP fails to detect shell prompts containing ] Date: Tue, 16 May 2023 19:53:27 +0200 Message-ID: <877ct8w4bs.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40050"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 63539@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 16 19:54:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pyysO-000A9e-5I for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 May 2023 19:54:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyys8-0003Cu-5O; Tue, 16 May 2023 13:54:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyys6-0003Ce-Ca for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 13:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pyys6-0004CS-3I for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 13:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyys5-0000gj-V4 for bug-gnu-emacs@gnu.org; Tue, 16 May 2023 13:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 May 2023 17:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63539 X-GNU-PR-Package: emacs Original-Received: via spool by 63539-submit@debbugs.gnu.org id=B63539.16842596232613 (code B ref 63539); Tue, 16 May 2023 17:54:01 +0000 Original-Received: (at 63539) by debbugs.gnu.org; 16 May 2023 17:53:43 +0000 Original-Received: from localhost ([127.0.0.1]:47695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyyrm-0000g4-Jh for submit@debbugs.gnu.org; Tue, 16 May 2023 13:53:42 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:52463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyyrj-0000fj-Cm for 63539@debbugs.gnu.org; Tue, 16 May 2023 13:53:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1684259608; i=michael.albinus@gmx.de; bh=+xPI+l6Lh4KEpNeHPo8+KYIpaZPLEGmN9y3hgeTbogA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=T4StXP0dwo9mFBEmSZLu6zDmK0DUfopApzMWr0qOHvqwwvPOIS0fKEAtRoGcQgATt 5jLxbhuEviWzeWR/XKL9EhtLPtMmcYFG4EgQBppDzKS1gO5Toe8IISSdxQUpSeAC8F gqfZcs6P3ax+0OUUD+YQkUgX9t+kBTapXTTbJqUCTXmdYLYtAJfdqHCjQo+hSM3ZgA smYsbeuQdQlUnK17WdsnTa+eej0TOoIy5+ZSGAhFutIDkvuUD7pstdKikz0fVBJRTz ARW9ZbnV337Z+/e3uU53DKszV+PnU9l1tJm9RWiF7VW5jZwhV7JZu4wsewa1YDwW4/ Mx101PJ9Y/WYA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.13]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQe5k-1pmHZ00SrG-00NfQV; Tue, 16 May 2023 19:53:28 +0200 In-Reply-To: (Spencer Baugh's message of "Tue, 16 May 2023 12:40:07 -0400") X-Provags-ID: V03:K1:9pC+jIcezgiXN79WmWNjP3FD5qeKYMFsRSE6d/T4rnQ7PAg7Nv4 SmeZcljl2+WN48Gi4sNtrCTQ98CwzAdh2OzY/HqgHY6YsCVQopqvqEY5/5teoYuqEZwNpvw +lmImWlMxH7wv3swzolNNbcagItOVuy6xeFK/y3fumD0EYLVWAJODitZsHuITYaPgZQ5rbF 2VKSBumwrasE5C1dLpkMQ== UI-OutboundReport: notjunk:1;M01:P0:pyTJE1n4cQw=;RWpCieh95km/0eq4HzxkMmJ2jij 5E0tNFqsHID3YTSiWMFZsAGP6wevN5WrN99w8+qDQ5LJ7CxDvimZu93rargM/AhZJqy8CXUJq oCL6YBbSDU2uL3xcrfNiAfW9bOcqEqbtQ3mT0TmuictczJcV9uMQLGyf0LvE95MlOE0Cfo96I KuY2H5LnjO9AduPyfHk/62tWTrMfn9Qb5JjzyhnehcmsohrT/IqLhplbhBZ9dhiUm/v+4I4Xc aCrvNHwIPvzMyaxhr5bk+/3kkn2yxEzyufe1bn1xNbQtjxkA143g25qa9vFkmQh7YD6FZW2P2 JMQl+SF5Zbqrxyw7uGx+pI1hU++xorZGGfTbG3E7iIXaGF09h6CEJnzMNAIQovFjsCbNqByKk 6EYNChTODNwGsKXnX6bykd4LvMYbQsPq/B1MpHQG+9PJkRbrYrHMfN6c7JgCgvYVUc4JN7MOY az/FMWIPJ4GNsIO1tTjlAtPs8uiDKrlLVk91NRDltGiohz5RgpKiebCSZKhZzKT2yEqUPfXI4 csmC5AlX8pY5HKJbKURLO5oO7zqbDyLb9wk6KuHUcROM2PgSf1DH92kfXKcp8SBtVystid4MK cSqA/Oel/qes6kGmJB5H+YI01P/dFY3hPlBl6NXrYEPmTjXHzlFujZReMuCo5DkLrFxGOlomR Y5Z/+XHKjMxrayuc37o5TW5UURco/oVGHU/9m75+PaRJZwKotST3msjQtWuj171MEsYzKQ4qV S3l3e/vw52m0V03vr5oYx/HLqmT/7EX6rGVqNdqF+iTHCRAWSGjyEQbahBTsBfl7JISLzR71 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261805 Archived-At: Spencer Baugh writes: Hi Spencer, > Attempting to ssh to a machine with a prompt like: > > [user@hostname] foo/bar/path $ > > will hang, because TRAMP thinks that the prompt ends at the "]", not the > "$". > > I guess this is because TRAMP supports prompts like "[foo bar baz]" with > no trailing $. And it isn't greedy when reading the prompt, so it stops > at the first "]". > > One can work around this by configuring the machine's prompt, but [] > seem relatively common in prompts (in my personal experience), and it > would be nice if this worked by default. (So far I've only seen [] in > custom prompts but there are probably some OSs/distributions with [] in > their prompt by default) What's wrong with the recipe for your remote .profile: --8<---------------cut here---------------start------------->8--- [[ $TERM == "dumb" ]] && PS1='$ ' && return --8<---------------cut here---------------end--------------->8--- The Tramp manual gives an extended version of the recipe, which handles also the zsh line editing problem, but you see the idea. And there is also the user option `tramp-shell-prompt-pattern' which you can customize as you like. Note, that Tramp cannot handle any case a user would prefer for detecting the prompt. Best regards, Michael.