Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Sep 2001 01:38:05 +0300
From:      Giorgos Keramidas <charon@labs.gr>
To:        Soren Neigaard <neigaard@e-box.dk>
Cc:        freebsd-newbies@FreeBSD.ORG
Subject:   Re: sh settings for users?
Message-ID:  <20010906013804.A638@hades.hell.gr>
In-Reply-To: <963828024.20010905212123@e-box.dk>; from neigaard@e-box.dk on Wed, Sep 05, 2001 at 09:21:23PM %2B0200
References:  <682008978.20010904181012@e-box.dk> <20010905153310.C466@hades.hell.gr> <963828024.20010905212123@e-box.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 05, 2001 at 09:21:23PM +0200, Soren Neigaard wrote:
> Wednesday, September 05, 2001, 2:33:10 PM, Giorgos wrote:
> 
> GK> > I use the standard sh shell. root can use the arrows to browse the
> GK> > history, but other users cant. Can I make it so that all new users
> GK> > have this feature, or shuld I make it so that all users share this
> GK> > feature (whitch is best, and how is it done)?
> GK>
> GK> Put in your .shrc (or the user's that needs history):
> GK>         set -o emacs
>
> Huh? I don't want emacs!? Ho do I make it so that all new users have
> history on arrow keys, and have autocompletion on the tab key?

This is what happens when I reply to messages that have more than one
question in them.  Remind me not to fall in this bear-trap again...

Your original mail had more than one question.  It's unedited text is
shown below. I chose to reply only to the question that I *did* know
the answer at the time.  Let's answer all of them, one at a time:

> I use the standard sh shell. root can use the arrows to browse the
> history, but other users cant. Can I make it so that all new users
> have this feature, or shuld I make it so that all users share this
> feature (whitch is best, and how is it done)?

According to you, root can use the arrow keys in /bin/sh (the standard
sh, as you call it) to browse through history entries.  This is
because his .shrc file contains:

	set -o emacs

If you 'dont want emacs' as you very kindly pointed out, you can go
read through the manpage of sh(1) to find out what this changes, and
either use this or `set -o vi'.  It's up to you to choose.  BUT FIRST,
read the manpage to understand what I'm talking about. *sigh*

Yes, you can make it so that all users have this feature turned on by
default.  Edit the .shrc file in the HOME of the existing users and
add this line.  Then, edit /usr/share/skel/dot.shrc and add it there
too.  First read the manpage of adduser to find out what the files in
/usr/share/skel are for.

> Can I make autocompletion work in sh (either on tab, or with
> duble-click on esc)?

No you can't. Period.

Install another, more featureful shell, to have autocompletion.

> The reason I use sh, is that I don't want to get "bad" habbits with 
> more powerfull shells, since I'm working differet "old" Unix systems,
> that dosn't have "powerfull" shells. Is this a bad excuse/idea?

No, it's neither an excuse, nor an idea.  It's a matter of taste.

-giorgos

PS: Next time you post, try to post *one* question in each message,
    please.

PPS: Did you even try what I suggested?

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010906013804.A638>