[comp.sys.apollo] Filename completion in Apollo's C shell

gupta@prlhp1.prl.philips.co.uk (Ashok Gupta) (11/23/90)

It seems hitting the ESC key to complete the filname, one has partly typed,
is not a default function of Apollo's implementation of the C shell.

Anyone got a work around ?

Please email and I'll summarise.

Thanks

emiel@prisma.cv.ruu.nl (Emiel Polman) (11/23/90)

In <1200@prlhp1.prl.philips.co.uk> gupta@prlhp1.prl.philips.co.uk (Ashok Gupta) writes:

>It seems hitting the ESC key to complete the filname, one has partly typed,
>is not a default function of Apollo's implementation of the C shell.
>
>Anyone got a work around ?
>
>Please email and I'll summarise.
>
>Thanks
There is no work around. The best way is to call HP and
there for help.

mike@vlsivie.tuwien.ac.at (Michael K. Gschwind) (11/25/90)

In article <1200@prlhp1.prl.philips.co.uk> gupta@prlhp1.UUCP writes:
>It seems hitting the ESC key to complete the filname, one has partly typed,
>is not a default function of Apollo's implementation of the C shell.
>
>Anyone got a work around ?
>
>Please email and I'll summarise.
>
>Thanks

From the csh manual page:
FILENAME COMPLETION
     When the filename completion feature is enabled by setting the shell
     variable filec (see set), csh interactively completes filenames and
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    usernames from unique prefixes, when they are input from the terminal
     followed by the escape character (the escape key, or CTRL/L).  For
     example, if the current directory looks like

               DSC.OLD   bin       cmd       lib       xmpl.c
               DSC.NEW   chaosnet  cmtest    mail      xmpl.o
               bench     class     dev       mbox      xmpl.out

Just execute the command
set filec 
in your ~/.cshrc file.

				Hope this helps,
						mike


Michael K. Gschwind, Institute for VLSI-Design, Vienna University of Technology
mike@vlsivie.tuwien.ac.at	1-2-3-4 kick the lawsuits out the door 
mike@vlsivie.uucp		5-6-7-8 innovate don't litigate         
e182202@awituw01.bitnet		9-A-B-C interfaces should be free
Voice: (++43).1.58801 8144	D-E-F-O look and feel has got to go!
Fax:   (++43).1.569697       

etb@milton.u.washington.edu (Eric Bushnell) (11/26/90)

>From the csh manual page:
>FILENAME COMPLETION
>     When the filename completion feature is enabled by setting the shell
>     variable filec (see set), csh interactively completes filenames and
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Just execute the command
>set filec 
>in your ~/.cshrc file.

Yeah, but it don't work! My apollos running SR10.2 and BSD4.3
won't complete file names properly either. From the console,
they just ignore ESC or ^L or whatever. From a dial-up vt100
terminal, they'll complete the name, but overwrite part of the
command line in the process (faulty termcap?).

So I'm askin' too: What gives?

Eric Bushnell
UW Civil Engineering
etb@milton.u.washington.edu

karel@duttnph.tudelft.nl (Karel Strasters) (11/26/90)

mike@vlsivie.tuwien.ac.at (Michael K. Gschwind) writes:

>Just execute the command
>set filec 
>in your ~/.cshrc file.

This doesn't work in a pad under Apollo DM. It does work if you are running
an xterm (Xapollo R3, SR10.2), but it does not echo very well. Example:
in referring to a directory 'my_own_stuff' by 'cd my_ow<Esc>' the output
will look like 'cd my_owtuff'. The result however is satisfactory.

I've encountered hangups though using the filec option. Had to kill the
xterm.

========================================================================
Karel C. Strasters         | karel@duttnph.tudelft.nl | karel@duttnph.UUCP
Pattern Recognition Group  | 31-(0)15-78 60 54        |
Faculty of Applied Physics | Delft University of      |
                           | Technology               |
and                        |                          | 
                           |                          | 
Molecular Cell Biology     | 31-(0)20-525 62 21       |
Faculty of Biology         | University of Amsterdam  |
--



========================================================================

karel@duttnph.tudelft.nl (Karel Strasters) (11/26/90)

mike@vlsivie.tuwien.ac.at (Michael K. Gschwind) writes:

>Just execute the command
>set filec 
>in your ~/.cshrc file.

This doesn't work in a pad under Apollo DM. It does work if you are running
an xterm (Xapollo R3, SR10.2), but it does not echo very well. Example:
in referring to a directory 'my_own_stuff' by 'cd my_ow<Esc>' the output
will look like 'cd my_owtuff'. The result however is satisfactory.

I've encountered hangups though using the filec option. Had to kill the
xterm.

========================================================================
Karel C. Strasters         | karel@duttnph.tudelft.nl | karel@duttnph.UUCP
Pattern Recognition Group  | 31-(0)15-78 60 54        |
Faculty of Applied Physics | Delft University of      |
                           | Technology               |

jlhaferman@l_eld01.icaen.uiowa.edu (Jeff Haferman) (11/26/90)

From article <2171@tuvie>, by mike@vlsivie.tuwien.ac.at (Michael K. Gschwind):
> 
> 
> Just execute the command
> set filec 
> in your ~/.cshrc file.
> 

This won't work in a normal Apollo window.  You need to be running
a terminal emulation program, eg 'vt100'.

I wish Apollo would get this fixed!

(Sun has had 'little' things like this working in their Unix for
 a long time!!!)


Jeff Haferman                            internet: jlhaferman@icaen.uiowa.edu
Department of Mechanical Engineering     DoD 0186  BMWMOA 44469  AMA 460140
University of Iowa
Iowa City IA  52240

krowitz@RICHTER.MIT.EDU (David Krowitz) (11/27/90)

The little-thing you want, ie. C-shell command completion, conflicts
with the DM's cook-mode input. Cooked-mode (the default input mode)
gives you the ability to edit your input pad prior to pressing the
"return" key -- the application program only sees the input when you
have sent a complete line. Command completion requires that the application
(in this case, the C-shell) sees the input character-by-character as it
is typed. This is the DM's raw-mode. /com/emt, the Apollo vt100 emuluator
(/com/vt100), and X applications like xterm run in this mode. The Aegis
pad_$raw and pad_$cooked calls can be used to toggle a DM window from
cooked-mode input to raw-mode and vice versa.


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter.mit.edu@eddie.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)

rees@pisa.ifs.umich.edu (Jim Rees) (11/27/90)

In article <11670@milton.u.washington.edu>, etb@milton.u.washington.edu (Eric Bushnell) writes:
  Yeah, but it don't work! My apollos running SR10.2 and BSD4.3
  won't complete file names properly either. From the console,
  they just ignore ESC or ^L or whatever.

That's because you're running your shell from a DM pad.  Pads aren't ttys.
They let you do things like edit the input before it gets eaten by your
shell, at the expense of things (like completion) that require line breaks
at other than newline boundaries.  Pads are great and some of us like them,
but they are not vt100s.

If this bothers you, it's easy enough to fix.  Just run your shell from an
xterm instead of from a pad.  I usually have a couple of pads and an xterm
open at the same time so I can pick whichever one I want to use at any
particular time.

Some day someone should write the perfect terminal emulator.  It would
behave a lot like a DM pad when it was in cooked mode, and a lot like an
xterm when it was in raw mode.

  From a dial-up vt100
  terminal, they'll complete the name, but overwrite part of the
  command line in the process (faulty termcap?).

This is a bug.  It seems to be a bug in the csh, not the termcap entry,
since it does this regardless of your terminal type.  Someone should send in
an APR (I don't do APRs any more).

smv@apollo.HP.COM (Steve Valentine) (11/28/90)

The filename completion (ESC) and expansion (^D) does work in a vt100 window,
xterm, or over an sio line.  As noted on this list, the command line is not
re-echoed correctly.  The workaround is to use ^R to reprint the input line.
We have already recieved several APR's on the subject, and we plan to fix the
echo problem in our next major release.

Filename completion does not work in a pad, and we have no plans to change this.
Steve Valentine - smv@apollo.hp.com
Hewlett-Packard Company, Apollo Systems Division, Chelmsford, MA
Hermits have no peer pressure. -Steven Wright

nazgul@alphalpha.com (Kee Hinckley) (11/28/90)

In article <4e42a679.20b6d@apollo.HP.COM> smv@apollo.HP.COM (Steve Valentine) writes:
>Filename completion does not work in a pad, and we have no plans to change this.

Actually, if you think about it you can make it work.  It involves
writing a small program which sends some DM commands to cut the
token before the cursor.  It then takes that, does the expansion
and then puts it back into a paste buffer.  Then it pastes the
contents of of the buffer back into the input pad.  Unfortunately
the process is a little slow (or rather it was slow back when I
wrote one on my DN400).  It might be usable nowadays.  It has one
real nice advantage in that it works anywhere, not just in a particular
shell.  You're on your own for writing it though, I've long since lost
the source.
					-kee

-- 
Alphalpha Software, Inc.	|	motif-request@alphalpha.com
nazgul@alphalpha.com		|-----------------------------------
617/646-7703 (voice/fax)	|	Proline BBS: 617/641-3722

I'm not sure which upsets me more; that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson)) (11/29/90)

In article <4e4240ee.1bc5b@pisa.ifs.umich.edu> rees@citi.umich.edu (Jim Rees) writes:
>This is a bug.  It seems to be a bug in the csh, not the termcap entry,
>since it does this regardless of your terminal type.  Someone should send in
>an APR (I don't do APRs any more).

I APR'ed it in Feb/89, and it has not been fixed yet. As mentioned, it
actually works in a telnet/rlogin/xterm, but the displayed line is total
garbage. You can get the line reprinted using the "rprnt" key (see 'stty').
-- 
Mike Peterson, System Administrator, U/Toronto Department of Chemistry
E-mail: system@alchemy.chem.utoronto.ca
Tel: (416) 978-7094                  Fax: (416) 978-8775

klaus@diku.dk (Klaus Ole Kristiansen) (11/29/90)

nazgul@alphalpha.com (Kee Hinckley) writes:

>In article <4e42a679.20b6d@apollo.HP.COM> smv@apollo.HP.COM (Steve Valentine) writes:
>>Filename completion does not work in a pad, and we have no plans to change this.

>Actually, if you think about it you can make it work.  It involves
>writing a small program which sends some DM commands to cut the
>token before the cursor.  It then takes that, does the expansion
>and then puts it back into a paste buffer.  Then it pastes the
>contents of of the buffer back into the input pad.  Unfortunately
>the process is a little slow (or rather it was slow back when I
>wrote one on my DN400).  It might be usable nowadays.  It has one
>real nice advantage in that it works anywhere, not just in a particular
>shell.  You're on your own for writing it though, I've long since lost
>the source.
>					-kee

There is such a program in the ADUS library, it is called
recognize. Unfortunately it gives the resulting pathname
in UPPER CASE, so it is not very useful with SR10 . Our
version of the ADUS library is several years old, so there
may be a newer version of recognize that preserves case.

Klaus Kristiansen