From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.help Subject: Re: eshell aliases and extra parameters Date: Wed, 19 Jun 2019 06:26:09 +0100 Message-ID: <877e9ixi1a.fsf@yandex.com> References: <20190618155946.21939370@mistral> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="170389"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: , help-gnu-emacs@gnu.org To: jonetsu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 19 07:26:38 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hdT7E-000i6A-SH for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Jun 2019 07:26:37 +0200 Original-Received: from localhost ([::1]:35248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdT7D-0000Zv-7n for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Jun 2019 01:26:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38459) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdT6z-0000Z6-N7 for help-gnu-emacs@gnu.org; Wed, 19 Jun 2019 01:26:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdT6x-0001Ap-QW for help-gnu-emacs@gnu.org; Wed, 19 Jun 2019 01:26:21 -0400 Original-Received: from forward104j.mail.yandex.net ([2a02:6b8:0:801:2::107]:41263) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hdT6v-00019g-PQ for help-gnu-emacs@gnu.org; Wed, 19 Jun 2019 01:26:18 -0400 Original-Received: from mxback20o.mail.yandex.net (mxback20o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::71]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 19A314A22DC; Wed, 19 Jun 2019 08:26:12 +0300 (MSK) Original-Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback20o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id LJMoezdEOV-QB2aqCCm; Wed, 19 Jun 2019 08:26:12 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1560921972; bh=KFC+/sQIrdJ4sSkRwxtiirSfb/zYyHiUpb0NLfYd7c4=; h=In-Reply-To:Subject:To:From:Cc:Cc:Date:References:Message-ID; b=l+Vks2DrJ3NL8jzMRXU32W4k8sFXgP4rlnlnp7VHGSR7PYU/t3oNEsoQ32JOa2jmF COk9AjXMTqdR6PhVN4ruUaVNZMTRWno1U+bX/Pe2hYvREO7W4vw6ilO8v9wCMZKuMv 5m7+D6vV5jQXjOJ6+paonuZD3RnH42PsifhJYCeo= Authentication-Results: mxback20o.mail.yandex.net; dkim=pass header.i=@yandex.com Original-Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id t9Q6iVDEgK-QAK4MAhf; Wed, 19 Jun 2019 08:26:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Face: -P+89ASh_wrs;AUGm`!l[}/o-lyK}5W.gq\fkJ{#d6Gu,hWrZNz::iMm5PJb} __A96]-LUrl)X=uF=V|\3-\9/sXvBs/H In-Reply-To: <20190618155946.21939370@mistral> (jonetsu@teksavvy.com's message of "Tue, 18 Jun 2019 15:59:46 -0400") Face: iVBORw0KGgoAAAANSUhEUgAAACwAAAAMCAIAAACWSshgAAAABmJLR0QA/wD/AP+gvaeTAAAA oklEQVQ4je2UsQ0CMRAE544zQiInoRMiGqEUIhojohOa4P1e0rc/QuIkAibcZMfy6qwcLmAsuMX9 5E9yeLTjtZ77TIGXQSLwbZICBI6XlYQFbJbZzn3vWRI7HA1vnNPaPiFQG6IqvZTVVyU091kLWEmg mieBVo0tQNB3ChlZiLEOBVb+w4QfGqb6T5rQlCYxIdFJGApUrb+YNg7nmxgy1T7TG8d+Sagxe3B4 AAAAAElFTkSuQmCC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:6b8:0:801:2::107 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120975 Archived-At: Dear Jonetsu, >>>>> jonetsu writes: > Hello, I have defined an alias for eshell, which is found in > .emacs/eshell/alias : > alias PC17 g++ -Wall -std=c++17 -pthread $1 > This works fine to compile files, such as: > PC17 explicit.cc > Although it does not work when an extra compile parameter is > added, such as: > PC17 -DEXPLICIT explicit.cc g++: fatal error: no input files > It looks like $1 does not stand for any number of arguments, > taking one and rejecting any others. > At the regular Linux console, the just-about same (w/o the $1) > alias works with extra params: > alias PC17='g++ -Wall -std=c++17 -pthread > % PC17 -DEXPLICIT explicit.cc > Is there a way to add on-the-spot parameters in eshell w/o having > to modify the eshell alias itself ? Try $* rather than $1, as in alias PC17 g++ -Wall -std=c++17 -pthread $* Best wishes, Colin Baxter.