[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: changing default name of shell
From: |
Bingham, Jay |
Subject: |
RE: changing default name of shell |
Date: |
Tue, 15 Oct 2002 10:40:08 -0500 |
Add this to your .emacs:
(add-hook 'shell-mode-hook (lambda () (rename-buffer "shell")))
If you want to have multiple shells each with a unique name generated without
the asterisks you can do this:
(add-hook 'shell-mode-hook (lambda () (rename-buffer (generate-new-buffer-name
"shell"))))
This will produce a buffer named shell on the first invocation and will produce
buffers named shell<n>, where n is a unique number starting with 2 and
incrementing by one, with each subsequent invocation of the shell. If you
don't like the <>'s you will have to get more creative inside the lambda
expression to strip them out.
-_
J_)
C_)ingham
. HP - NonStop Austin Software & Services - Software Product Assurance
. Austin, TX
. Language is the apparel in which your thoughts parade in public.
. Never clothe them in vulgar and shoddy attire. -Dr. George W. Crane-
-----Original Message-----
From: Miles Bader [mailto:miles@lsi.nec.co.jp]
Sent: Tuesday, October 15, 2002 2:06 AM
To: help-gnu-emacs@gnu.org
Subject: Re: changing default name of shell
Chris <chrisl_ak@hotmail.com> writes:
> Is there a way I can automatically change the name of a shell buffer when I
> open it? I would it to be called just "shell" or something without the *
> surrounding the name so it is easier to complete with tab completion...
If you have a recent (21.x) version of emacs, give `M-x shell' command a
prefix argument, e.g., `C-u M-x shell', and it will prompt you for a
name.
Otherwise, you could always use `M-x rename-buffer' after you create
the shell.
-miles
--
P.S. All information contained in the above letter is false,
for reasons of military security.
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs