From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_HELO_IP_MISMATCH,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 6C0A321BB6 for ; Tue, 30 Apr 2024 15:59:45 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1714485585; b=We9l1qsrXKHvg8Qj+7iNJyG4m6cj6MdLSf8MZrwWsKyj7dYj+5IGeeeX4769vZ6QFKZOSdCm1P LnWNAn5ccDJJH/oKRKrHUF4lEQoE2o7bvN5Y/JSHR1IgiDts3M0Wqj8kXyBmY6H1nXUtNGHa1P IwT9HZQg82GgoeTSmAJ69T2PPhSiV6sQC5vboGi4DsRtu2RK9424sUYwzLxX3dEpkF3MehEHGX 8ooG86Ir7L/ZSkMLtzGpmdfhPN9kAKfakNIP9vwmjGe5Y6eV/6DdTgIRpaQwfXieFbfWGhf3+U jVhWCnZ9NR32hYOgxMOWPwE1a4Dk1wlblUKAtn42II8dtA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpout02-ext4.partage.renater.fr) smtp.remote-ip=194.254.241.31; dkim=pass header.d=unistra.fr header.s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3 header.a=rsa-sha256; dmarc=pass header.from=unistra.fr; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1714485585; bh=z32DRZIGNgUOGkvWt/PtD4ogihP7Fjota+sJudvN/JE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Subject:To:From:Date:DKIM-Signature:DKIM-Signature; b=m7PWLYsdObKpRwpn5SAHR055qVInepzk3su8K7Y7v4vFx0QxGf/CQqRDQrpex0nM9I9fFcmIV8 EFJaMK6i3J+8vkirZ2ZwdzBTX0KZuqYqlP8L6B5KmaKF9/I0nsjFLmM91FxcsppyLW7iyKPhef xHZcQK/cjkx9mUYVq6j4/2gAYlmH3Wn9IXthDFtB9kwCZwFsVBNWRQuecd47D9p6cv6YG8Jq3j rbajxpDvziJPwL1wZmp3HmHcc+lDfhUedadUL4xAoIUEDbAkLY1Bvqa7pD4pDx3mtgQ1VjqwZ6 aD4rd7AkVKpguDLUYxDUv3GpjwUd1TqQTFVSTwPAnNyQUA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=hmREFdO6P5BSq3vEd8NtlrbRencIJ4necHSOhov3leI=; b=YDmL16mTWgirmduELc3lEOVZY6 s/b3BCOvxANlZzywBI4D8SxrvPCkAGDfvfO4ARm8SJ0p7InkS2EpwyOD0sXClmzS5xkIFtmdt3J8i VHwYPcM4IpgFJLHRXvVemsdExO5m6eY8GJll1WqtyhQQ7WbZ8MaveNtLdooYzeCnvHTu6c93s8oOv 41bkUuuSIrfdxLmOBylic11yfomdIO0ljyXAj1AlAKWoIBBofPvOBlIdt9FKJAduAprFMxF8xPd+3 qYfclJwAx4i2wAvqa7Vnl0luFyk58caQb9AoluRgysDRlUByij+IiA93pvQASyf4qyaR8eXPFgH/Q +3z6PtmQ==; Received: by zero.zsh.org with local id 1s1o1H-0003Ij-PX; Tue, 30 Apr 2024 13:59:43 +0000 Authentication-Results: zsh.org; iprev=pass (smtpout02-ext4.partage.renater.fr) smtp.remote-ip=194.254.241.31; dkim=pass header.d=unistra.fr header.s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3 header.a=rsa-sha256; dmarc=pass header.from=unistra.fr; arc=none Received: from smtpout02-ext4.partage.renater.fr ([194.254.241.31]:53170) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1s1o0Z-0002aB-U3; Tue, 30 Apr 2024 13:59:00 +0000 Received: from zmtaauth02.partage.renater.fr (zmtaauth02.partage.renater.fr [194.254.241.25]) by smtpout20.partage.renater.fr (Postfix) with ESMTP id DBCEEBFDCA for ; Tue, 30 Apr 2024 15:58:57 +0200 (CEST) Received: from zmtaauth02.partage.renater.fr (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPS id CA1C1A0984 for ; Tue, 30 Apr 2024 15:58:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTP id BAC0CA0988 for ; Tue, 30 Apr 2024 15:58:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zmtaauth02.partage.renater.fr BAC0CA0988 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unistra.fr; s=CF279DD4-6F58-4C59-BB33-73FDC6DFC1E3; t=1714485537; bh=hmREFdO6P5BSq3vEd8NtlrbRencIJ4necHSOhov3leI=; h=Date:From:To:Message-ID:MIME-Version; b=JW8Yw30YEAM/RcetztmWHpf1Qwx3C3jEZpXim7utrjX0f9L+yNd25IDDbpUrJ2MXs NbYl0vGVgDcxydpWKZkIMSLGypqb4nR119OUZkVQlbDQ2KW6/wvUwiOYEHxRYLPPvI UfmztRQEb3I5yocfjLH8YLYdPa/nttTi2ddcZD8Xbg+SibdkZUMhkxHJiXX/eSabSW P18uDtyysx2wuoYXeYh2gGI3l7DMmFMONHu42sTH6iWCEbecKanCt/ntTN3FzmeaJq PUZsWUO6OCt+J1ERukNeSg047Ha9MUQSOksiYO0j/mjE/nNlbj2XTsnuvB/1jATWA5 MEVob7Jw4LO1w== Received: from zmtaauth02.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth02.partage.renater.fr [127.0.0.1]) (amavis, port 10026) with ESMTP id nWOwG-SNvb4D for ; Tue, 30 Apr 2024 15:58:57 +0200 (CEST) Received: from 82.67.52.52 (unknown [194.254.241.251]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPA id 8C869A0984 for ; Tue, 30 Apr 2024 15:58:57 +0200 (CEST) Date: Tue, 30 Apr 2024 15:58:57 +0200 From: Marc Chantreux To: Zsh Users Subject: A way to find a bug (or explain a missuse of) realpath expansion? Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline X-Virus-Scanned: clamav-milter 0.103.8 at clamav04 X-Virus-Status: Clean X-Renater-Ptge-SpamState: clean X-Renater-Ptge-SpamScore: -100 X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgedvledrvddufedgieelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecutffgpfetvffgtfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfggtggugfesthekredttddtudenucfhrhhomhepofgrrhgtucevhhgrnhhtrhgvuhiguceomhgtsehunhhishhtrhgrrdhfrheqnecuggftrfgrthhtvghrnhephfduleehheettdffheefheffieeileeguedvffekhfeludefhfdvgfejgeeftdfhnecukfhppeduleegrddvheegrddvgedurddvhedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelgedrvdehgedrvdeguddrvdehuddphhgvlhhopeekvddrieejrdehvddrhedvpdhmrghilhhfrhhomhepmhgtsehunhhishhtrhgrrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhg Content-Transfer-Encoding: quoted-printable X-Seq: 29863 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: hello, The /usr shade of path will disapear from debian distribution so right now we have: realpath /usr/bin /usr/bin/ /bin /bin/| sort -u # /usr/bin Let's forget extra / for the moment: I can get the same result with: foo=3D( {/usr,}/bin ) foo=3D( ${foo%/} ) foo=3D( $foo(:A) ) print -l ${(u)foo} # /usr/bin but I don't know how to oneline it: foo=3D( {/usr,}/bin ) print -l ${(u):-${foo%/}(:A)} # /usr/bin # /usr/bin neither I can deal with backslashed twins. foo=3D( {/usr,}/bin{,/} ) ; print -l ">>>> setting foo" $foo foo=3D( ${foo%/} ) ; print -l ">>>> remove tailing /" $foo foo=3D( $foo(:A) ) ; print -l ">>>> realpath" $foo foo=3D( ${(u)foo} ) ; print -l ">>>> uniq" $foo >>>> setting foo /usr/bin /usr/bin/ /bin /bin/ >>>> remove tailing / /usr/bin /usr/bin /bin /bin >>>> realpath /usr/bin /usr/bin /bin /usr/bin >>>> uniq /usr/bin /bin I also realize I post those kind of questions for 20 years now just because the zsh community is friendly enough to reply again and again: I still don't know how to give a closer look to the way zsh work to fix it by myself. To me the next step seems to be: * compile my own version of zsh with symbols (from apt source and dpkg-buildpackage?) * run a gdb session and start to explore the code Is it? is there still something easier to try at this point? I want to learn fishery. regards, --=20 Marc Chantreux P=F4le CESAR (Calcul et services avanc=E9s =E0 la recherche) Universit=E9 de Strasbourg 14 rue Ren=E9 Descartes, BP 80010, 67084 STRASBOURG CEDEX 03.68.85.60.79