* bash builtin expansion in shell.el
@ 2009-06-13 19:07 jidanni
2009-06-13 20:15 ` Peter Dyballa
0 siblings, 1 reply; 7+ messages in thread
From: jidanni @ 2009-06-13 19:07 UTC (permalink / raw
To: help-gnu-emacs
There are plenty of
bash$ help|wc
46 449 3701
builtin bash commands that the *shell* buffer is unaware of, as it only
knows about $PATH.
So how can I get
bash$ hist<TAB>
to become
bash$ history ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash builtin expansion in shell.el
2009-06-13 19:07 jidanni
@ 2009-06-13 20:15 ` Peter Dyballa
2009-06-13 21:33 ` jidanni
[not found] ` <mailman.593.1244928793.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Peter Dyballa @ 2009-06-13 20:15 UTC (permalink / raw
To: jidanni; +Cc: help-gnu-emacs
Am 13.06.2009 um 21:07 schrieb jidanni@jidanni.org:
> So how can I get
> bash$ hist<TAB>
> to become
> bash$ history ?
Either type "history" and then RET, or create aliases and make them
known to the *shell* buffer in the file ~/.emacs_bash. You can also
read in the documentation how to delegate the command expansion to
bash – in your example GNU Emacs' shell-mode tries to fulfil this.
I am a tcsh user. I have no quarrels with tcsh, shell-mode gives me
enough. Would you like to learn shell-mode, too? I mean, if you want
to use bash instead of GNU Emacs, why don't you use a more simple
mode, or no mode at all?
--
Greetings
Pete 0
%-/\_//
(*)(*)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash builtin expansion in shell.el
[not found] <mailman.580.1244920049.2239.help-gnu-emacs@gnu.org>
@ 2009-06-13 20:57 ` Xah Lee
2009-06-15 17:24 ` Xah Lee
0 siblings, 1 reply; 7+ messages in thread
From: Xah Lee @ 2009-06-13 20:57 UTC (permalink / raw
To: help-gnu-emacs
On Jun 13, 12:07 pm, jida...@jidanni.org wrote:
> There are plenty of
> bash$ help|wc
> 46 449 3701
> builtin bash commands that the *shell* buffer is unaware of, as it only
> knows about $PATH.
>
> So how can I get
> bash$ hist<TAB>
> to become
> bash$ history ?
i don't think the example you have is traditional unix. Perhaps you
forgot the dollar sign? Also, in my env, there's no “history” as env
var by default (never heard of that), but there's “$HIST”.
env var expansion works in emacs's shell command in both OS X and
Windows Vista. However, when you run shell in emacs, not necessarly
all your env var in terminal are inherited. The situation is a bit
complex depending on what OS you running.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash builtin expansion in shell.el
2009-06-13 20:15 ` Peter Dyballa
@ 2009-06-13 21:33 ` jidanni
[not found] ` <mailman.593.1244928793.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: jidanni @ 2009-06-13 21:33 UTC (permalink / raw
To: peter_dyballa; +Cc: help-gnu-emacs
Completing command name...
No completions of hist
Completing file name...
No completions of ali
PD> Either type "history" and then RET, or create aliases and make them
PD> known to the *shell* buffer in the file ~/.emacs_bash.
What do I do?
alias history=history
alias alias=alias
?
I am using the *shell* buffer in
$ emacs -f shell
instead of trying to use the remote readline functions of
$ ssh very-far-away-and-slow.org
Maybe I need to fool *shell* with a directory on $PATH fill of
executable links with the same names as the bash builtins?
touch bla
chmod 755 bla
ln history alias suspend typeset ... bla
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash builtin expansion in shell.el
2009-06-13 20:57 ` bash builtin expansion in shell.el Xah Lee
@ 2009-06-15 17:24 ` Xah Lee
0 siblings, 0 replies; 7+ messages in thread
From: Xah Lee @ 2009-06-15 17:24 UTC (permalink / raw
To: help-gnu-emacs
On Jun 13, 1:57 pm, Xah Lee <xah...@gmail.com> wrote:
> On Jun 13, 12:07 pm, jida...@jidanni.org wrote:
>
> > There are plenty of
> > bash$ help|wc
> > 46 449 3701
> > builtin bash commands that the *shell* buffer is unaware of, as it only
> > knows about $PATH.
>
> > So how can I get
> > bash$ hist<TAB>
> > to become
> > bash$ history ?
>
> i don't think the example you have is traditional unix. Perhaps you
> forgot the dollar sign? Also, in my env, there's no “history” as env
> var by default (never heard of that), but there's “$HIST”.
>
> env var expansion works in emacs's shell command in both OS X and
> Windows Vista. However, when you run shell in emacs, not necessarly
> all your env var in terminal are inherited. The situation is a bit
> complex depending on what OS you running.
Oops i glossed over your previous message. Just for posterity, never
mind my previous reply. :)
Xah
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash builtin expansion in shell.el
[not found] ` <mailman.593.1244928793.2239.help-gnu-emacs@gnu.org>
@ 2009-06-15 17:39 ` Xah Lee
2009-06-19 22:12 ` jidanni
0 siblings, 1 reply; 7+ messages in thread
From: Xah Lee @ 2009-06-15 17:39 UTC (permalink / raw
To: help-gnu-emacs
On Jun 13, 2:33 pm, jida...@jidanni.org wrote:
> Completing command name...
> No completions of hist
> Completing file name...
> No completions of ali
> PD> Either type "history" and then RET, or create aliases and make them
> PD> known to the *shell* buffer in the file ~/.emacs_bash.
> What do I do?
> alias history=history
> alias alias=alias
> ?
>
> I am using the *shell* buffer in
> $ emacs -f shell
> instead of trying to use the remote readline functions of
> $ ssh very-far-away-and-slow.org
>
> Maybe I need to fool *shell* with a directory on $PATH fill of
> executable links with the same names as the bash builtins?
> touch bla
> chmod 755 bla
> ln history alias suspend typeset ... bla
not sure what's your solution.
anyhow, this problem is not difficult to implement. For me, i'd say
few days full time.
• How To Implement Keyword Completion in Emacs
http://xahlee.org/emacs/elisp_keyword_completion.html
I've also been using this package in the 2 years or so:
it support command and file name completions.
;;; shell-command.el --- enables tab-completion for `shell-command'
http://namazu.org/~tsuchiya/elisp/shell-command.el
however, it doesn't support bash keywords as in your message. Maybe
ask the person who did icicles... it is a package designed to do all
sort of completions, but i don't know if it solves your case. It's on
emacswiki.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash builtin expansion in shell.el
2009-06-15 17:39 ` Xah Lee
@ 2009-06-19 22:12 ` jidanni
0 siblings, 0 replies; 7+ messages in thread
From: jidanni @ 2009-06-19 22:12 UTC (permalink / raw
To: help-gnu-emacs
>>>>> "XL" == Xah Lee <xahlee@gmail.com> writes:
XL> ;;; shell-command.el --- enables tab-completion for `shell-command'
XL> http://namazu.org/~tsuchiya/elisp/shell-command.el
M-! (shell-command) now has completion in emacs23
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-06-19 22:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.580.1244920049.2239.help-gnu-emacs@gnu.org>
2009-06-13 20:57 ` bash builtin expansion in shell.el Xah Lee
2009-06-15 17:24 ` Xah Lee
2009-06-13 19:07 jidanni
2009-06-13 20:15 ` Peter Dyballa
2009-06-13 21:33 ` jidanni
[not found] ` <mailman.593.1244928793.2239.help-gnu-emacs@gnu.org>
2009-06-15 17:39 ` Xah Lee
2009-06-19 22:12 ` jidanni
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.