From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#66903: 29.1; shell-mode directory tracking incorrectly handles double slashes Date: Sat, 04 Nov 2023 08:23:19 +0530 Message-ID: <871qd6fcv4.fsf@gmail.com> References: <83pm0r71e8.fsf@gnu.org> <83jzqz70xb.fsf@gnu.org> <83fs1n6o50.fsf@gnu.org> <83bkca7w45.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3926"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66903@debbugs.gnu.org, Eli Zaretskii , Eshel Yaron , darkfeline@felesatra.moe To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 04 03:54:33 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 1qz6nx-0000sb-TW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Nov 2023 03:54:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qz6nr-0003ts-Hr; Fri, 03 Nov 2023 22:54:27 -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 1qz6nq-0003tj-Ev for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 22:54:26 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qz6nq-0008K0-6O for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 22:54:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qz6oQ-0006uh-1f for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 22:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Nov 2023 02:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66903 X-GNU-PR-Package: emacs Original-Received: via spool by 66903-submit@debbugs.gnu.org id=B66903.169906644626505 (code B ref 66903); Sat, 04 Nov 2023 02:55:02 +0000 Original-Received: (at 66903) by debbugs.gnu.org; 4 Nov 2023 02:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:60170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qz6nW-0006tR-7g for submit@debbugs.gnu.org; Fri, 03 Nov 2023 22:54:06 -0400 Original-Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:49513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qz6nU-0006sv-4X for 66903@debbugs.gnu.org; Fri, 03 Nov 2023 22:54:04 -0400 Original-Received: by mail-pg1-x541.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso2039489a12.3 for <66903@debbugs.gnu.org>; Fri, 03 Nov 2023 19:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699066402; x=1699671202; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5+7X3pYR30y0wHwKTflTunpBXBVWBl8DXLOPpkB5ufc=; b=LVRDBtKAnW7sEtAZL3SJvMjFj/baZXQIm7vfUq4DSAHeESdnjBUNBz0//DWbgaHvFN 7sRDfcBCcWM3ISriYCzyFrmxrwV+5D/IZ6EoJ8QFXHIk3e3aVxuJmYgeYvIplXQfnl0Y ptlnFz95nmcLkLd4ILxb/8QG/jtfLFaSUUFLrLcpfn/rCIi+fDLiBzG2SDgzB3zs4O8y 4McGAr9LlXf3PW31zZuKhj22F/NmUZ2Ubad+ng7V/pc3Vdf28Jq1Ca5S0MlKwS+UO+dN Yj8imZRhxzAIOJ0FxbnLCxusYKcsPDWxIxIbzYY0yCmx/7avS/p+1V0aFIKWe8kaY7iE E9WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699066402; x=1699671202; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5+7X3pYR30y0wHwKTflTunpBXBVWBl8DXLOPpkB5ufc=; b=JmEDfC8x5KJdLkgtLqq9zgL1oBoDrrobrWII0b+oYpBajcVkROzJ9QOa/p7Pood8IE PLbll0n0LEihMARMWHU8gd9VoD2FyVyFz0EoI+la3AuFkDnsNioMPSMJhUJ45zbAXPTc 8j887F8NdwzZFdZXBNBJeEVb4B2WruVHKvHuiLCi+DYpjavveDCUvRdC0igrwgMgLI/N VFAbLojLccuwvvy7ETAFY7zU4Xzn9dI9q2zfOC9RF9IYQdicUGJsHHI51YbYxARQ4ciP tCm5ldmy1src18P7pMyTJxR4bIl1dTH+yEWi+1uxmzR/UA9lvpkCEDIBraTo4f3w1u24 89YQ== X-Gm-Message-State: AOJu0YyM83u41K6GkiAr5XMBYTrey5Sp8b2MlGMhe0gTmEVQh/lHv+d2 NtHBJEO52lDAzSBlqQM6+6iNAYFJCmgPWg== X-Google-Smtp-Source: AGHT+IEyP2oajnGfMez00T9rrBVCkOhbFbUEAIzxfwQ3bDwER8wJUMJr40zT4PV1xpNjAO4/l3djXw== X-Received: by 2002:a05:6a21:7803:b0:181:3129:363 with SMTP id be3-20020a056a21780300b0018131290363mr13148763pzc.58.1699066402332; Fri, 03 Nov 2023 19:53:22 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id e14-20020a17090ac20e00b00279163e52bbsm1939959pjt.17.2023.11.03.19.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 19:53:22 -0700 (PDT) In-Reply-To: (Stefan Kangas's message of "Fri, 3 Nov 2023 17:21:11 -0700") 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:273740 Archived-At: [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=A8=E0=AE=B5= =E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 03, 2023] Stefan Kangas wrote: > It would be highly dangerous to start mangling command lines to shells > run under `M-x shell' in incompatible ways. Not to mention that such a > change would be backwards-incompatible. Consider the command > > sudo rm -rf ~//usr > > This is not a contrived example, BTW, but more or less exactly a command > I have run in the last year. I don't think I used //, but double > slashes are always collapsed in POSIX, so I can't be sure. It's not > something I look for that when cobbling together shell commands in > POSIX-compatible shells (bash and zsh here). > > So I think we should not do that. A more common scenario I can think of is output of commands not sanitising the filenames to change the double slashes to a single slash. When you copy such a filename from the output to the comint prompt as part of a command and experience a different behaviour when you send the command, it would be annoying IMO. I copy the filename from the output precisely to avoid typing-and-editing, I don't want to do it more.