🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #246

Re: An annoying feature of file completion, perhaps?

#246
From: Eyvind Ness
Date: Wed, 08 Apr 1992 07:22
122 lines
3614 bytes
  | Date: Tue, 7 April 1992, 10:01 -0400
  | From: Chet Ramey
  |
  | >   | on a completely unrelated note, when I use bash on top of csh using
  | >   | 
  | >   | bash -login
  | >   | 
  | >   | I get couple of copies of
  | >   | 
  | >   | setenv: command not found
  | >   | 
  | >   | As far as I can tell, it complains but has no problems.
  | >   | Could someone explain why this happens? Thanks.
  | 
  | Your diagnosis was on the mark, but there's a simpler cure:
  | 
  | setenv()
  | {
  | 	export $1="$2"
  | }

But you can't put this alias in /etc/profile before the offending `tset'
command, because /etc/profile is consulted by all Bourne shell like
shells, some of which might be ignorant about functions and aliases.

I suggest instead that you make a habit of typing:

	% env SHELL=/bin/bash bash -login

when switching from *csh to bash and when your login SHELL is *csh. And
vice versa:

	bash$ env SHELL=/bin/csh csh

when switching from bash to csh and when your login shell is bash. This
will make tset see the correct SHELL env var before it issues it
terminal specific and shell dependent initializations.


>From the manual entry of tset(1) on my system:

 NAME
      tset, reset - terminal-dependent initialization

 SYNOPSIS
      tset [options] [-m [ident] [test baudrate] :type] ...  [type]

      reset

      [...]

           -s      Generate appropriate commands (depending on current SHELL
                   environment variable) to set TERM.


Example bash->csh (Wrong!)

   dole(bash)$ echo $SHELL
   /bin/bash
   dole(bash)$ csh
   dole% tset -s
   export TERM;
   TERM=xterm;
   Erase is Delete
   Kill is Ctrl-U


Example bash->csh (Correct!):

   dole(bash)$ env SHELL=/bin/bash csh
   dole% tset -s
   set noglob;
   setenv TERM xterm ;
   unset noglob;
   Erase is Delete
   Kill is Ctrl-U


Example csh->bash (Wrong!)

   % echo $SHELL
   /bin/csh
   % bash -login
   dole(bash)$ tset -s
   set noglob;
   setenv TERM xterm ;
   unset noglob;
   Erase is Delete
   Kill is Ctrl-U


Example csh->bash (Correct!):

   % env SHELL=/bin/bash bash -login
   dole(bash)$ tset -s
   export TERM;
   TERM=xterm;
   Erase is Delete
   Kill is Ctrl-U


Above I have assumed that bash is found in /bin/bash, but of course it
may reside womewhere else on your system. Just substitute "/bin/bash"
with the full path to bash wherever you see "/bin/bash" above.

Eyvind.

 - a Bash lover.


+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 Eyvind Ness                    Internet Email: Eyvind.Ness@HRP.No
 Research Scientist             Phone: +47 9 183100
 Control Room Systems Division  Fax: +47 9 187109
 OECD Halden Reactor Project    Surface Mail: P.O. Box 173, N-1751 Halden
 Norway
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

 -One of the problems for established companies is the entrenchment of
the Fred Flintstone Mainframe MIS person.

 -Hi! I am a .signature virus. Copy me into your .signature to join in!
Technical Details
Message-ID: <9204080722.AA16544@dole.hrp.no>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!hrp.NO!eyvind.ness
References: <9204071401.AA13087.SM@odin.INS.CWRU.Edu>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!hrp.NO!eyvind.ness
From: eyvind.ness@hrp.NO (Eyvind Ness)
Subject: Re: An annoying feature of file completion, perhaps?
Message-ID: <9204080722.AA16544@dole.hrp.no>
Sender: gnulists@ai.mit.edu
Reply-To: Eyvind.Ness@hrp.no
Organization: GNUs Not Usenet
References: <9204071401.AA13087.SM@odin.INS.CWRU.Edu>
Distribution: gnu
Date: Wed, 8 Apr 1992 07:22:00 GMT
Approved: bug-bash@prep.ai.mit.edu
Lines: 123