Re: Tab to Auto-Complete + ....

2005-01-19 Thread RW
On Tuesday 18 January 2005 12:10, Warren wrote:
 I changed the shell type using:  chsh -s /bin/csh

I think you want /bin/tcsh/ which is the enhanced version of csh. Incidently I 
think tcsh is the default for root, not csh, which is probably why 
auto-completion works for you in root.

It's recommended that you stick to shells  in /bin for root, and tcsh is the 
best of these. For non-root account you have more choice, bash and ksh are 
popular.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tab to Auto-Complete + ....

2005-01-19 Thread Daniel Bye
On Wed, Jan 19, 2005 at 02:32:41PM +, RW wrote:
 On Tuesday 18 January 2005 12:10, Warren wrote:
  I changed the shell type using:  chsh -s /bin/csh
 
 I think you want /bin/tcsh/ which is the enhanced version of csh. Incidently 
 I 
It's the same thing:

---$ ls -i /bin/csh /bin/tcsh 
24836 /bin/csh* 24836 /bin/tcsh*

 think tcsh is the default for root, not csh, which is probably why 
 auto-completion works for you in root.

root:*:0:0:Charlie :/root:/bin/csh

File completion works because `set filec' is set in /.cshrc

 It's recommended that you stick to shells  in /bin for root, and tcsh is the 
 best of these. For non-root account you have more choice, bash and ksh are 
 popular.

This is true enough.  If you really want to use a different shell, then
you could probably write a conditional test to go in the default shell's
startup files.  For example, to run bash, put a conditional test in
.cshrc to check that bash can be invoked without errors.  If so, exec()
it.  If not, then just continue with csh.  Voila.  You have a bash shell, 
without having to change root's default shell.  I am afraid I can't help 
with the syntax, as I don't use csh.

HTH

Dan

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpwzbX4BhoLI.pgp
Description: PGP signature


Re: Tab to Auto-Complete + ....

2005-01-19 Thread RW
On Wednesday 19 January 2005 15:22, Daniel Bye wrote:
 On Wed, Jan 19, 2005 at 02:32:41PM +, RW wrote:

  It's recommended that you stick to shells  in /bin for root, and tcsh is
  the best of these. For non-root account you have more choice, bash and
  ksh are popular.

 This is true enough.  If you really want to use a different shell, then
 you could probably write a conditional test to go in the default shell's
 startup files.  For example, to run bash, put a conditional test in
 .cshrc to check that bash can be invoked without errors.  If so, exec()
 it.  If not, then just continue with csh.  Voila.  You have a bash shell,
 without having to change root's default shell.  I am afraid I can't help
 with the syntax, as I don't use csh.

I don't really know whether that's safe. There was a long discussion about 
this recently and it was not about root being left shellless if /usr doesn't 
mount (in single user mode the default is sh anyway). There was a specific 
problem in the ports list that was tracked down to the someone not using a 
shell in /bin (and copying another shell to /bin is just as bad, unless it's 
statically linked).   I didn't follow it in any detail - I decided it was 
just better to stick to tcsh for root.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tab to Auto-Complete + ....

2005-01-19 Thread RW
On Wednesday 19 January 2005 15:22, Daniel Bye wrote:
 On Wed, Jan 19, 2005 at 02:32:41PM +, RW wrote:
  On Tuesday 18 January 2005 12:10, Warren wrote:
   I changed the shell type using:  chsh -s /bin/csh
 
  I think you want /bin/tcsh/ which is the enhanced version of csh.

 It's the same thing:

 ---$ ls -i /bin/csh /bin/tcsh
 24836 /bin/csh* 24836 /bin/tcsh*

Whilst you may well be right about csh and tcsh having identical behaviour in 
FreeBSD, you cannot infer that by comparing the binaries. It actually quite 
common for related programs to have the same executable.

For example:

$ md5 -r /usr/bin/*grep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/bzegrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/bzfgrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/bzgrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/egrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/fgrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/grep
5a35688710a92604bce83761bca5ea61 /usr/bin/pgrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/zegrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/zfgrep
44c602f0c4ad6838ec0ba9f353ad4616 /usr/bin/zgrep
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Tab to Auto-Complete + ....

2005-01-18 Thread Warren
What is need for me to add/do in order for the pressing of Tab to autcomplete 
a name to work?  It works fine in root .. also when i press the up or down 
arrow keys it dosent bring up the previous command issued ... 

im using FreeBSD5.3-STABLE
-- 
Yours Sincerely
Shinjii
http://www.shinji.nq.nu
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tab to Auto-Complete + ....

2005-01-18 Thread Ian Moore
On Tue, 18 Jan 2005 21:00, Warren wrote:
 What is need for me to add/do in order for the pressing of Tab to
 autcomplete a name to work?  It works fine in root .. also when i press the
 up or down arrow keys it dosent bring up the previous command issued ...

 im using FreeBSD5.3-STABLE

What shell are you using? It sounds like you might be using /bin/sh, the 
Bourne shell, which doesn't support those functions, but is the default for 
non-root accounts.
The root account by default uses /bin/csh (actually the tcsh) which does what 
you want. So all you need to do is change the chell of your user.
The easiest way is to login as your user  type chsh
On the line than starts with Shell:, change /bin/sh to /bin/csh
Save the changes and then logout  login again  you should have command line 
completion  job history.
To make auto-completion better, edit the file .cshrc in your home directory 
and add the line
autolist = ambigous
after the set prompt =  line.

Alternatively, you could install  use another shell like bash or ksh...

Cheers,
-- 
Ian

GPG Key: http://homepages.picknowl.com.au/imoore/imoore.asc


pgpk59ALZi3it.pgp
Description: PGP signature


RE: Tab to Auto-Complete + ....

2005-01-18 Thread Walker, Michael
 What is need for me to add/do in order for the pressing of Tab to
 autcomplete a name to work?  It works fine in root .. also when i
 press the up or down arrow keys it dosent bring up the previous
 command issued ... 
 
 im using FreeBSD5.3-STABLE

Works fine with me, I am using bash2. What shell are you using?


**
This email and any files transmitted with it are confidential, and may be 
subject to legal privilege, and are intended solely for the use of the 
individual or entity to whom they are addressed.  
If you have received this email in error or think you may have done so, you may 
not peruse, use, disseminate, distribute or copy this message. Please notify 
the sender immediately and delete the original e-mail from your system.

Computer viruses can be transmitted by e-mail. Recipients should check this 
e-mail for the presence of viruses. The Capita Group and its subsidiaries 
accept no liability for any damage caused by any virus transmitted by this 
e-mail.
***

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tab to Auto-Complete + ....

2005-01-18 Thread Daniel Bye
On Tue, Jan 18, 2005 at 08:30:52PM +1000, Warren wrote:
 What is need for me to add/do in order for the pressing of Tab to autcomplete 
 a name to work?  It works fine in root .. also when i press the up or down 
 arrow keys it dosent bring up the previous command issued ... 
 
 im using FreeBSD5.3-STABLE

What shell are you using?  I guess you haven't installed any shells from
ports yet, and are using the system default, /bin/sh, which doesn't
support autocomplete or command history.  The root shell is csh, which
does have such things.  So, either set your user's shell to be
/bin/tcsh, or install one of the several shells in ports.

HTH

Dan

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpNQJPcSRsEC.pgp
Description: PGP signature


Re: Tab to Auto-Complete + ....

2005-01-18 Thread Mark Ovens
Daniel Bye wrote:
On Tue, Jan 18, 2005 at 08:30:52PM +1000, Warren wrote:
What is need for me to add/do in order for the pressing of Tab to 
autcomplete a name to work?  It works fine in root .. also when i 
press the up or down arrow keys it dosent bring up the previous 
command issued ...

im using FreeBSD5.3-STABLE
What shell are you using?  I guess you haven't installed any shells 
from ports yet, and are using the system default, /bin/sh, which 
doesn't support autocomplete or command history.
It does support command history and editing, though not auto-complete.
''set -E'' or ''set -V'' at the prompt (or put either - they are 
mutually exclusive - in ~/.profile) will enable command history with
Emacs or vi style command editing respectively.

Regards,
Mark
The root shell is csh, which does have such things.  So, either set 
your user's shell to be /bin/tcsh, or install one of the several 
shells in ports.

HTH
Dan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tab to Auto-Complete + ....

2005-01-18 Thread Daniel Bye
On Tue, Jan 18, 2005 at 11:52:16AM +, Mark Ovens wrote:
 
 It does support command history and editing, though not auto-complete.
 
 ''set -E'' or ''set -V'' at the prompt (or put either - they are 
 mutually exclusive - in ~/.profile) will enable command history with
 Emacs or vi style command editing respectively.

Live and learn!  Thanks for that.

Dan

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpTm6W9OB9Kl.pgp
Description: PGP signature


Re: Tab to Auto-Complete + ....

2005-01-18 Thread Warren
On Tue, 18 Jan 2005 10:03 pm, Daniel Bye wrote:
 On Tue, Jan 18, 2005 at 11:52:16AM +, Mark Ovens wrote:
  It does support command history and editing, though not auto-complete.
 
  ''set -E'' or ''set -V'' at the prompt (or put either - they are
  mutually exclusive - in ~/.profile) will enable command history with
  Emacs or vi style command editing respectively.

 Live and learn!  Thanks for that.

 Dan

I changed the shell type using:  chsh -s /bin/csh
re-logged in as it prompts and still no go with anything .. so i just simply 
installed putty and used it to connect to each machine.

Thanks for all the help.

-- 
Yours Sincerely
Shinjii
http://www.shinji.nq.nu
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Tab to Auto-Complete + ....

2005-01-18 Thread Mark Ovens
Warren wrote:
On Tue, 18 Jan 2005 10:03 pm, Daniel Bye wrote:
On Tue, Jan 18, 2005 at 11:52:16AM +, Mark Ovens wrote:
 It does support command history and editing, though not auto-complete.

 ''set -E'' or ''set -V'' at the prompt (or put either - they are
 mutually exclusive - in ~/.profile) will enable command history with
 Emacs or vi style command editing respectively.
Live and learn!  Thanks for that.
Dan
I changed the shell type using:  chsh -s /bin/csh
re-logged in as it prompts and still no go with anything .. so i just simply 
installed putty and used it to connect to each machine.

Thanks for all the help.
Put some or all of these in ~/.cshrc
# size of history buffer
set history = 100
# enable auto-complete
set filec
# stop it beeping
set nobeep
# ignore *.o files for file completion
set fignore = '.o'
# '%' prompt for normal user; '#' for root/su
set promptchars=%#
# /path/to/cwd{cmd number}%
set prompt=%/{!}%# 
# List matches when autocompleting
set autolist=true
# enable spelling correction
set correct=all
# Useful key bindins
bindkey ^W backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
bindkey ^? backward-delete-char
bindkey \e[3~ delete-char
bindkey \e[1~ beginning-of-line
bindkey \e[4~ end-of-line
See csh(1) for loads of additional options!
HTH
Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]