help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

eshell aliases and extra parameters


From: jonetsu
Subject: eshell aliases and extra parameters
Date: Tue, 18 Jun 2019 15:59:46 -0400

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 ?

Cheers.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]