tcsh: How to make 'complete' accept multiple command-patterns?

tcsh: How to make 'complete' accept multiple command-patterns?

Post by Klas Mellbou » Sun, 12 Sep 1993 22:08:10

I'm using OSF1, on a DEC alpha and running tcsh 6.03.00.

I have recently discovered the excellent programmable completion
feature in tcsh. The only thing that I miss is that I would like it if
the completion detected aliases of the commands it knows how to
complete. For instance, I have aliased mkdir with md, but when I use
md the command interpreter does not use my 'n/*/d/' completion on the
mkdir. To solve this nicely I would like to use a regular expression
in the command-pattern of complete...

complete 'mkdir|md' 'n/*/d/'

to make the command interpreter complete both mkdir and md arguments
with directories. This and several similar attempts I have made does
not work, however. Is there a way to achieve this function without
writing several 'complete'-commands for the same completion?

On a completely different matter: I am not able to save or load my
directory stack. Whenever I write 'dirs -S' the shell stupidly answers
'Usage: dirs [-lvnSLc]', a syntax that I am obviously obeying! What is
Klas Mellbourn     I tel +46 8 15 56 17         I  Robert McElwaine
Koersbaersv 3:110  I Public key on request      I  speaks the truth!


1. 'last' command doesn't show complete login times

I am trying to use the information from the "last" command to examine
how long users are logged into a certain machine for a research
project.  I wrote a perl script to parse the information into a comma
delimited file, opened it in a spreadsheet, and sorted the entries by
how long the users were logged in.  To my surprise, out of about 3200
entries, only 17 of them showed up as being logged in for more than an
hour!  I know this information is inaccurate, because these users work
on projects for hours at a time.  Another mystery is that when I run
"who", it shows about 50 users being logged in, whereas the "last"
command only shows about 10.  Running last using utmpx as the file
instead of the default wtmpx, it shows users being logged in for a lot
longer. (???)

I know that the "who" command uses the utmpx file, and the "last"
command uses the wtmpx file, but shouldn't the wtmpx file contain the
same information as the utmpx file, only a lot more of it?  Can anyone
think of an explanation to why the "last" output isn't showing the
entire session a user is logged in for?  Also, if there is data
missing, is there another way I can get the login and logout history
of all the users?

I would greatly appreciate any help you can give. :)


2. can't open a 0600 file using ifstream

3. nice tcsh complete for 'make'

4. Nikon Mass Storage Device Problems

5. help pattern matching with 'find' command

6. Problem with PPP and 2 NIC's on the same machine

7. How about 'previous command auto-complete'?

8. What's the best wireless for laptops?

9. Multiple 'accept' howto?

10. 'sh': Finding out whether I need to provide a complete path to a command

11. Piping results of a 'find' command to a 'mv' command...

12. can sed pattern contain '<' & '>' characters or not?

13. installing 'collect', 'analyze' tools without complete Compiler set