Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
bash question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  21 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
notbob  
View profile  
 More options Aug 10 2012, 8:07 am
Newsgroups: comp.os.linux.misc
From: notbob <not...@nothome.com>
Date: 10 Aug 2012 12:07:26 GMT
Local: Fri, Aug 10 2012 8:07 am
Subject: bash question
Learned a new bash trick.  While writing a command on the CL, I can
enter a key shortcut:

Ctrl-x e

....which will put me in my default editor, which is allegedly
determined by my environmental variable, $EDITOR, where I can edit
said command at length.  After editing said command line and exiting
my editor, the command will execute.  OK, fine.  It works as
advertised.

My question is, how does my bash shell know to go to emacs --which it
does, and jes happens to be my preferred editor-- if I have no $EDITOR
env var?  I looked.  I invoked echo $EDITOR and got a blank line.  ???

Is there some other variable, determined by the distro, that defaults
to a specific editor?  I'm running Slackware 13.37.

nb

--
"Do you recognize me?  No!
...cuz I don't work here"
Support labelling GMO foods
http://www.nongmoproject.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
notbob  
View profile  
 More options Aug 10 2012, 8:12 am
Newsgroups: comp.os.linux.misc
From: notbob <not...@nothome.com>
Date: 10 Aug 2012 12:12:42 GMT
Local: Fri, Aug 10 2012 8:12 am
Subject: Re: bash question
On 2012-08-10, notbob <not...@nothome.com> wrote:

> Is there some other variable, determined by the distro, that defaults
> to a specific editor?  I'm running Slackware 13.37.

DOH!!  Nevermind.  I figured it out.  From man bash:

"Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
 that order."

Sorry to bother.  Only 1st cuppa joe.  ;)

nb

--
"Do you recognize me?  No!
...cuz I don't work here"
Support labelling GMO foods
http://www.nongmoproject.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J G Miller  
View profile  
 More options Aug 10 2012, 9:38 am
Newsgroups: comp.os.linux.misc
From: J G Miller <mil...@yoyo.ORG>
Date: Fri, 10 Aug 2012 13:38:08 +0000 (UTC)
Local: Fri, Aug 10 2012 9:38 am
Subject: Re: bash question
On Friday, August 10th, 2012, at 12:12:42h +0000, NotBoB explained:

> "Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
>  that order."

It is a wonder that the vi afficianados have not gone to war
over that!  ;)

It is always a good idea to set BROWSER, EDITOR, VISUAL, and PAGER
according to your preferences in your .profile or .tcshrc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keith Keller  
View profile  
 More options Aug 10 2012, 10:32 am
Newsgroups: comp.os.linux.misc
From: Keith Keller <kkeller-use...@wombat.san-francisco.ca.us>
Date: Fri, 10 Aug 2012 07:32:18 -0700
Local: Fri, Aug 10 2012 10:32 am
Subject: Re: bash question
On 2012-08-10, J G Miller <mil...@yoyo.ORG> wrote:

> On Friday, August 10th, 2012, at 12:12:42h +0000, NotBoB explained:

>> "Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
>>  that order."

> It is a wonder that the vi afficianados have not gone to war
> over that!  ;)

Nah--vi users, apparently unlike emacs users, know how to set the
EDITOR environment variable.  ;-)

--keith

--
kkeller-use...@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Davies  
View profile  
 More options Aug 10 2012, 10:20 am
Newsgroups: comp.os.linux.misc
From: Chris Davies <chris-use...@roaima.co.uk>
Date: Fri, 10 Aug 2012 15:20:43 +0100
Local: Fri, Aug 10 2012 10:20 am
Subject: Re: bash question

notbob <not...@nothome.com> wrote:
> My question is, how does my bash shell know to go to emacs

The default is emacs. For the rest of us there's the "set -o vi" option
that can be put in the .bashrc.

Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stan Bischof  
View profile  
 More options Aug 10 2012, 11:03 am
Newsgroups: comp.os.linux.misc
From: Stan Bischof <s...@worldbadminton.com>
Date: 10 Aug 2012 15:03:52 GMT
Local: Fri, Aug 10 2012 11:03 am
Subject: Re: bash question

Keith Keller <kkeller-use...@wombat.san-francisco.ca.us> wrote:
>> It is a wonder that the vi afficianados have not gone to war
>> over that!  ;)

> Nah--vi users, apparently unlike emacs users, know how to set the
> EDITOR environment variable.  ;-)

Wow- there hasn't been a good editor war or even a decent flamefest
in many many years!

Are you perhaps trying to start one?

Stan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
notbob  
View profile  
 More options Aug 10 2012, 11:07 am
Newsgroups: comp.os.linux.misc
From: notbob <not...@nothome.com>
Date: 10 Aug 2012 15:07:39 GMT
Local: Fri, Aug 10 2012 11:07 am
Subject: Re: bash question
On 2012-08-10, Chris Davies <chris-use...@roaima.co.uk> wrote:

> The default is emacs. For the rest of us there's the "set -o vi" option
> that can be put in the .bashrc.

As if I'd voluntarily impose such an affliction upon myself!  

nb

--
"Do you recognize me?  No!
...cuz I don't work here"
Support labelling GMO foods
http://www.nongmoproject.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
notbob  
View profile  
 More options Aug 10 2012, 11:09 am
Newsgroups: comp.os.linux.misc
From: notbob <not...@nothome.com>
Date: 10 Aug 2012 15:09:19 GMT
Local: Fri, Aug 10 2012 11:09 am
Subject: Re: bash question
On 2012-08-10, Stan Bischof <s...@worldbadminton.com> wrote:

> Are you perhaps trying to start one?

Never one to be shy, allow me to cast the first stone:

"vi ....the heart of evil!"  --notbob

nb

--
"Do you recognize me?  No!
...cuz I don't work here"
Support labelling GMO foods
http://www.nongmoproject.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J G Miller  
View profile  
 More options Aug 10 2012, 11:42 am
Newsgroups: comp.os.linux.misc
From: J G Miller <mil...@yoyo.ORG>
Date: Fri, 10 Aug 2012 15:42:48 +0000 (UTC)
Local: Fri, Aug 10 2012 11:42 am
Subject: Re: bash question
On Friday, August 10th, 2012, at 07:32:18h -0700, Keith Keller observed:

> Nah--vi users, apparently unlike emacs users, know how to set the
> EDITOR environment variable.  ;-)

Personally I prefer emacs to vi, but actually tend to use vi a lot
more because I do a lot of one off editing of small configuration files.

However, since vi is usually installed by default and emacs as
an extra, I would have thought that the bash default should have
been vi.

At least it is not set to ed  ;)

And there is a version of "The One True Editor" for Linux at

    <http://almy.us/teco.html>

make love, not war       ;)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keith Keller  
View profile  
 More options Aug 10 2012, 11:44 am
Newsgroups: comp.os.linux.misc
From: Keith Keller <kkeller-use...@wombat.san-francisco.ca.us>
Date: Fri, 10 Aug 2012 08:44:17 -0700
Local: Fri, Aug 10 2012 11:44 am
Subject: Re: bash question
On 2012-08-10, Stan Bischof <s...@worldbadminton.com> wrote:

> Keith Keller <kkeller-use...@wombat.san-francisco.ca.us> wrote:
>>> It is a wonder that the vi afficianados have not gone to war
>>> over that!  ;)

>> Nah--vi users, apparently unlike emacs users, know how to set the
>> EDITOR environment variable.  ;-)

> Wow- there hasn't been a good editor war or even a decent flamefest
> in many many years!

> Are you perhaps trying to start one?

Not intentionally!  Just making a joke, which, at least to me, I thought
was obvious, since presumably anyone experienced enough to prefer emacs
over an editor like pico is experienced enough to be able to set
environment variables.

But perhaps I'm wrong.  ;-)

--keith

--
kkeller-use...@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Espen  
View profile  
 More options Aug 10 2012, 12:47 pm
Newsgroups: comp.os.linux.misc
From: Dan Espen <des...@verizon.net>
Date: Fri, 10 Aug 2012 12:47:31 -0400
Local: Fri, Aug 10 2012 12:47 pm
Subject: Re: bash question

Keith Keller <kkeller-use...@wombat.san-francisco.ca.us> writes:
> On 2012-08-10, J G Miller <mil...@yoyo.ORG> wrote:
>> On Friday, August 10th, 2012, at 12:12:42h +0000, NotBoB explained:

>>> "Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
>>>  that order."

>> It is a wonder that the vi afficianados have not gone to war
>> over that!  ;)

> Nah--vi users, apparently unlike emacs users, know how to set the
> EDITOR environment variable.  ;-)

An Emacs user that wanted to use this feature would be setting
$EDITOR to emacsclient.

--
Dan Espen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J G Miller  
View profile  
 More options Aug 10 2012, 12:56 pm
Newsgroups: comp.os.linux.misc
From: J G Miller <mil...@yoyo.ORG>
Date: Fri, 10 Aug 2012 16:56:46 +0000 (UTC)
Local: Fri, Aug 10 2012 12:56 pm
Subject: Re: bash question
On Friday, August 10th, 2012, at 12:47:31h -0400, Dan Espen suggested:

> An Emacs user that wanted to use this feature would be setting
> $EDITOR to emacsclient.

An emacs user would be using bash inside Emacs anyways  ;)

M-x shell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Espen  
View profile  
 More options Aug 10 2012, 1:28 pm
Newsgroups: comp.os.linux.misc
From: Dan Espen <des...@verizon.net>
Date: Fri, 10 Aug 2012 13:28:46 -0400
Local: Fri, Aug 10 2012 1:28 pm
Subject: Re: bash question
J G Miller <mil...@yoyo.ORG> writes:

> On Friday, August 10th, 2012, at 12:47:31h -0400, Dan Espen suggested:

>> An Emacs user that wanted to use this feature would be setting
>> $EDITOR to emacsclient.

> An emacs user would be using bash inside Emacs anyways  ;)

> M-x shell

This Emacs user has little use for any command line tool.

M-x compile
M-x grep

etc...

I went though a short M-x shell period and found little use for it.
Years ago.

--
Dan Espen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
The Natural Philosopher  
View profile  
 More options Aug 10 2012, 1:42 pm
Newsgroups: comp.os.linux.misc
From: The Natural Philosopher <t...@invalid.invalid>
Date: Fri, 10 Aug 2012 18:42:58 +0100
Local: Fri, Aug 10 2012 1:42 pm
Subject: Re: bash question
notbob wrote:
> On 2012-08-10, Stan Bischof <s...@worldbadminton.com> wrote:
>> Are you perhaps trying to start one?

> Never one to be shy, allow me to cast the first stone:

> "vi ....the heart of evil!"  --notbob

..but available on every *nix system I have ever had to edit a file on..

> nb

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Norbert Möndjen  
View profile  
 More options Aug 10 2012, 1:40 pm
Newsgroups: comp.os.linux.misc
From: Norbert Möndjen <n.moend...@vodafone.de>
Date: Fri, 10 Aug 2012 19:40:46 +0200
Local: Fri, Aug 10 2012 1:40 pm
Subject: Re: bash question

Stan Bischof wrote:
> Keith Keller <kkeller-use...@wombat.san-francisco.ca.us> wrote:
>>> It is a wonder that the vi afficianados have not gone to war
>>> over that!  ;)

>> Nah--vi users, apparently unlike emacs users, know how to set the
>> EDITOR environment variable.  ;-)

> Wow- there hasn't been a good editor war or even a decent flamefest
> in many many years!

> Are you perhaps trying to start one?

> Stan

Emacs and vi can maybe called text-prozessors but both lack the editor-
ability. An Editor is small, easy and intuitiv to use.

Ciao Nobbe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris F.A. Johnson  
View profile  
 More options Aug 10 2012, 4:21 pm
Newsgroups: comp.os.linux.misc
From: "Chris F.A. Johnson" <cfajohn...@gmail.com>
Date: Fri, 10 Aug 2012 16:21:15 -0400
Local: Fri, Aug 10 2012 4:21 pm
Subject: Re: bash question
On 2012-08-10, J G Miller wrote:

> On Friday, August 10th, 2012, at 12:47:31h -0400, Dan Espen suggested:

>> An Emacs user that wanted to use this feature would be setting
>> $EDITOR to emacsclient.

> An emacs user would be using bash inside Emacs anyways  ;)

> M-x shell

   The shell in emacs does not have the capabiliies of a good terminal
   window. I have only one application that I use in emacs shell:
<http://www.facebook.com/media/set/?set=a.494508738852.269597.53363385...>

   I use emacs as my editor, and I do a lot of editing (scripts, web
   pages, PostScript, Usenet, email, etc.). I always have emacs open,
   and use emacsclient in alpine, slrn and firefox.

--
   Chris F.A. Johnson, <http://cfajohnson.com>
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Davies  
View profile  
 More options Aug 10 2012, 5:55 pm
Newsgroups: comp.os.linux.misc
From: Chris Davies <chris-use...@roaima.co.uk>
Date: Fri, 10 Aug 2012 22:55:44 +0100
Local: Fri, Aug 10 2012 5:55 pm
Subject: Re: bash question

> On 2012-08-10, Chris Davies <chris-use...@roaima.co.uk> wrote:
>> The default is emacs. For the rest of us there's the "set -o vi" option
>> that can be put in the .bashrc.
notbob <not...@nothome.com> wrote:
> As if I'd voluntarily impose such an affliction upon myself!  

Clearly the simpler option is the default, leaving us experts to make
the change to suit.

Chris
:-P


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Riches  
View profile  
 More options Aug 11 2012, 12:10 am
Newsgroups: comp.os.linux.misc
From: Robert Riches <spamtra...@jacob21819.net>
Date: 11 Aug 2012 04:10:00 GMT
Subject: Re: bash question
On 2012-08-10, The Natural Philosopher <t...@invalid.invalid> wrote:

> notbob wrote:
>> On 2012-08-10, Stan Bischof <s...@worldbadminton.com> wrote:
>>> Are you perhaps trying to start one?

>> Never one to be shy, allow me to cast the first stone:

>> "vi ....the heart of evil!"  --notbob

> ..but available on every *nix system I have ever had to edit a file on..

>> nb

And some versions of vi actually let you delete a character that
was in the file before you brought up the editor.  It's a pain to
be stuck one of the versions of vi that doesn't allow it.

Emacs, a _REAL_ editor.

--
Robert Riches
spamtra...@jacob21819.net
(Yes, that is one of my email addresses.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
notbob  
View profile  
 More options Aug 11 2012, 9:01 am
Newsgroups: comp.os.linux.misc
From: notbob <not...@nothome.com>
Date: 11 Aug 2012 13:01:47 GMT
Local: Sat, Aug 11 2012 9:01 am
Subject: Re: bash question
On 2012-08-11, Robert Riches <spamtra...@jacob21819.net> wrote:

> And some versions of vi actually let you delete a character that
> was in the file before you brought up the editor.  It's a pain to
> be stuck one of the versions of vi that doesn't allow it.

You mean it's a one mode vi?  Never heard of such a thing.  

That's my entire case against vi(x).  Ya gotta change modes to edit.
What genius came up with that stroke of insanity?  Jay-sus, a half
century old Underwood doesn't even require that.  Sure, I can use vi
if necessary, but why would I want to.

> Emacs, a _REAL_ editor.

I'll be the first to admit, it can be a _REAL_ pain!  But, at least ya
don't hafta change modes to edit.  Plus, it's a great file mgr.  That,
IMO, is what makes emacs so great.  I always start emacs in dired /.
You can do anything from there.

nb

--
"Do you recognize me?  
No!  ...cuz I don't fsckin' work here"
Support labelling GMO foods
http://www.nongmoproject.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aragorn  
View profile  
 More options Aug 11 2012, 12:08 pm
Newsgroups: comp.os.linux.misc
Followup-To: comp.os.linux.misc
From: Aragorn <stry...@telenet.be.invalid>
Date: Sat, 11 Aug 2012 18:08:53 +0200
Local: Sat, Aug 11 2012 12:08 pm
Subject: Re: bash question
On Saturday 11 August 2012 15:01, notbob conveyed the following to
comp.os.linux.misc...

Ahh, it's been a long time since I last witnessed the editor wars... :p

Just for the record, I have used vi in the past on proprietary UNIX -
Sperry OS/3, to be precise - and I have both vim and emacs installed
here on my GNU/Linux system.  Both are very powerful editors - and
perhaps too powerful for my own needs - but personally, I prefer emacs
as well. ;-)

--
= Aragorn =
(registered GNU/Linux user #223157)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli the Bearded  
View profile  
 More options Aug 14 2012, 6:47 pm
Newsgroups: comp.os.linux.misc
From: Eli the Bearded <*...@eli.users.panix.com>
Date: Tue, 14 Aug 2012 22:47:04 +0000 (UTC)
Local: Tues, Aug 14 2012 6:47 pm
Subject: Re: bash question
In comp.os.linux.misc, J G Miller  <mil...@yoyo.ORG> wrote:

> On Friday, August 10th, 2012, at 12:12:42h +0000, NotBoB explained:
> > "Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in
> >  that order."
> It is a wonder that the vi afficianados have not gone to war
> over that!  ;)

Simple, don't use bash. In AT&T ksh the default editor for history is
(wait for it):

$ env -i ksh -e set |grep -iE 'edit|visual'
FCEDIT=/bin/ed
$

> It is always a good idea to set BROWSER, EDITOR, VISUAL, and PAGER
> according to your preferences in your .profile or .tcshrc

BROWSER? I've lived all these years and never set that and never
had a problem by not setting it.

Elijah
------
is comfortable editing files with ed


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »