From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29122: eshell passes ARGV[0] as full path to executable Date: Fri, 03 Nov 2017 12:02:10 +0200 Message-ID: <83tvybvfx9.fsf@gnu.org> References: <87fu9v932y.fsf@users.sourceforge.net> <83a803wxm1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1509703403 7212 195.159.176.226 (3 Nov 2017 10:03:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Nov 2017 10:03:23 +0000 (UTC) Cc: 29122@debbugs.gnu.org To: Yegor Timoshenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 03 11:03:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAYof-0000yn-0A for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Nov 2017 11:03:09 +0100 Original-Received: from localhost ([::1]:35697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAYom-0003Tj-A5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Nov 2017 06:03:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAYob-0003TV-0Q for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 06:03:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAYoa-0003tV-6O for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 06:03:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40059) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAYoa-0003tL-35 for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 06:03:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eAYoY-0000Zn-Fn for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 06:03:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2017 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29122 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29122-submit@debbugs.gnu.org id=B29122.15097033442146 (code B ref 29122); Fri, 03 Nov 2017 10:03:02 +0000 Original-Received: (at 29122) by debbugs.gnu.org; 3 Nov 2017 10:02:24 +0000 Original-Received: from localhost ([127.0.0.1]:48736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAYnw-0000YY-6N for submit@debbugs.gnu.org; Fri, 03 Nov 2017 06:02:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAYnu-0000YM-L3 for 29122@debbugs.gnu.org; Fri, 03 Nov 2017 06:02:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAYnk-0002wf-Si for 29122@debbugs.gnu.org; Fri, 03 Nov 2017 06:02:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAYnk-0002wH-Pt; Fri, 03 Nov 2017 06:02:12 -0400 Original-Received: from [176.228.60.248] (port=1710 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eAYnj-0003jf-9d; Fri, 03 Nov 2017 06:02:12 -0400 In-reply-to: (message from Yegor Timoshenko on Fri, 3 Nov 2017 09:22:59 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139405 Archived-At: > From: Yegor Timoshenko > Date: Fri, 3 Nov 2017 09:22:59 +0000 > > The use case here is when programs print usage information. > > Usage: ./a.out command [arguments...] > Usage: /home/user/path/to/a.out command [arguments...] > > The former reads better and is generally expected from shells. You will get the same problem when a.out is found by searching PATH. And on Windows, your program will almost always get argv[0] in absolute form. So you need to take care of that anyway, or else your program will sometimes produce that less readable output.