* Alias for eshell to grep command
@ 2020-11-19 3:54 Christopher Dimech
2020-11-19 16:09 ` Jean Louis
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Dimech @ 2020-11-19 3:54 UTC (permalink / raw)
To: Help Gnu Emacs
I would like to make an alias for eshell so I can use the command
grep --include="*.org" --include="*.texi" -hir -C "$1" "$2" "$3"
Have tried the following but the tactic failed.
alias grepot 'grep --include="*.org" --include="*.texi" -hir -C "$1" "$2" "$3"'
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Alias for eshell to grep command
2020-11-19 3:54 Alias for eshell to grep command Christopher Dimech
@ 2020-11-19 16:09 ` Jean Louis
2020-11-19 16:39 ` Christopher Dimech
0 siblings, 1 reply; 3+ messages in thread
From: Jean Louis @ 2020-11-19 16:09 UTC (permalink / raw)
To: Christopher Dimech; +Cc: Help Gnu Emacs
* Christopher Dimech <dimech@gmx.com> [2020-11-19 06:55]:
> I would like to make an alias for eshell so I can use the command
>
> grep --include="*.org" --include="*.texi" -hir -C "$1" "$2" "$3"
>
> Have tried the following but the tactic failed.
>
> alias grepot 'grep --include="*.org" --include="*.texi" -hir -C "$1"
> "$2" "$3"'
alias grepot '\*grep --include="*.org" --include="*.texi" -hir -C "$1" "$2" "$3"'
I just believe by doing above you may do that.
I could see that I had to escape * in front of grep as only *grep will
use the system command grep. In eshell Emacs functions have priority
so $ grep alone would invoke Emacs grep and show it in the buffer.
I believe you want it shown in the eshell, right?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Alias for eshell to grep command
2020-11-19 16:09 ` Jean Louis
@ 2020-11-19 16:39 ` Christopher Dimech
0 siblings, 0 replies; 3+ messages in thread
From: Christopher Dimech @ 2020-11-19 16:39 UTC (permalink / raw)
To: Jean Louis; +Cc: Help Gnu Emacs
> Sent: Thursday, November 19, 2020 at 5:09 PM
> From: "Jean Louis" <bugs@gnu.support>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Alias for eshell to grep command
>
> * Christopher Dimech <dimech@gmx.com> [2020-11-19 06:55]:
> > I would like to make an alias for eshell so I can use the command
> >
> > grep --include="*.org" --include="*.texi" -hir -C "$1" "$2" "$3"
> >
> > Have tried the following but the tactic failed.
> >
> > alias grepot 'grep --include="*.org" --include="*.texi" -hir -C "$1"
> > "$2" "$3"'
>
> alias grepot '\*grep --include="*.org" --include="*.texi" -hir -C "$1" "$2" "$3"'
>
> I just believe by doing above you may do that.
>
> I could see that I had to escape * in front of grep as only *grep will
> use the system command grep. In eshell Emacs functions have priority
> so $ grep alone would invoke Emacs grep and show it in the buffer.
>
> I believe you want it shown in the eshell, right?
You are quite right. Yes in the eshell.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-19 16:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-19 3:54 Alias for eshell to grep command Christopher Dimech
2020-11-19 16:09 ` Jean Louis
2020-11-19 16:39 ` Christopher Dimech
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).