From: Colin Baxter <m43cap@yandex.com>
To: jonetsu <jonetsu@teksavvy.com>
Cc: , help-gnu-emacs@gnu.org
Subject: Re: eshell aliases and extra parameters
Date: Wed, 19 Jun 2019 06:26:09 +0100 [thread overview]
Message-ID: <877e9ixi1a.fsf@yandex.com> (raw)
In-Reply-To: <20190618155946.21939370@mistral> (jonetsu@teksavvy.com's message of "Tue, 18 Jun 2019 15:59:46 -0400")
Dear Jonetsu,
>>>>> jonetsu <jonetsu@teksavvy.com> 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.
next prev parent reply other threads:[~2019-06-19 5:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 19:59 eshell aliases and extra parameters jonetsu
2019-06-19 5:26 ` Colin Baxter [this message]
2019-06-19 13:28 ` jonetsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877e9ixi1a.fsf@yandex.com \
--to=m43cap@yandex.com \
--cc=help-gnu-emacs@gnu.org \
--cc=jonetsu@teksavvy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.