Tcsh complete (autocomplete) script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Tcsh complete (autocomplete) script
# 1  
Old 11-27-2012
Tcsh complete (autocomplete) script

I cant figure out how the complete function works in tcsh.

1. I whould like it to complete after writing my_program.py with either start or stop.

I have tried to do something like this in .cshrc.user:

complete my_program.py \
'c/start/' \
'c/stop/'

However i cant get it to work. What do I do wrong?


2. Also whould like for the command to find all shell scripts under test/bin/*.sh
test/tool/*.sh

after writing my_program.py start test/<list of bin and tool> and after then only sh scripts.


3. Is it possible to parse out a function in a python file and also be able to execute that function?
# 2  
Old 11-27-2012
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cp command autocomplete

Hi I'm still new around bash and Ubuntu, but I was expecting for the "cp" command to have an autocomplete feature like the ls command. Should it, or I'm assuming too much? In case it doesn't have by default, is there a way to enable it? Cheers (2 Replies)
Discussion started by: blackfox2015
2 Replies

2. Shell Programming and Scripting

Regular expressions in tcsh script

Hi, I have a shell script in tcsh to which I pass an argument, the length of which can vary. The possible values of the argument are the letters -c,s,i,q,a. and also a combination of these letters. (e.g: cs,si,ca,iq,qa,csq,acs,csia ..etc). The order of the letters does not matter. My problem... (2 Replies)
Discussion started by: Vaisakh P
2 Replies

3. Shell Programming and Scripting

Help in tcsh script

Hi All, I wrote a tcsh script, but being a beginner it took me lots of efforts and on top of that I am still struggling with little modifications here and there. kindly have a loop. Line1 : I want it to run maximum of "Max" Which I am providing outside loop. So how the "for" should be... (10 Replies)
Discussion started by: nrjrasaxena
10 Replies

4. Shell Programming and Scripting

help programming tcsh tab complete

Short problem: I would like some help with programming tab-complete in tcsh. If anybody has a website they can send me to, or any help, that would be Excellent. Thanks much! Long backstory (you don't necessarily need to read this, but I'm putting this here just in case) At work, there... (0 Replies)
Discussion started by: tbttfox
0 Replies

5. UNIX for Dummies Questions & Answers

BASH complete-filename & menu-complete together

Hi, Does anyone know how to make BASH provide a list of possible completions on the first tab, and then start cycling through the possibilites on the next tab? Right now this is what I have in my .bashrc: bind "set show-all-if-ambiguous on" bind \\C-o:menu-complete This allows... (0 Replies)
Discussion started by: Mithu
0 Replies

6. Programming

help wid C-script in tcsh

Hello Freinds I have just started off with Unix (TCSH) although I have a pretty sound background with C-programming. Kindly convey any error in foll script. #include<stdio.h> #include<math.h> #define PI 3.142857 main () { float r, A; printf("Enter the value of radius: "); scanf(" %f... (12 Replies)
Discussion started by: mahendrakamath
12 Replies

7. Shell Programming and Scripting

tcsh I can't get script to work :(

I have an export utility that exports documents from the native file to text. This is the way I would run it from the command line: expage "file" > "file.txt I am trying to loop through all the documents in the directory and expage them, here is the code: #!/usr/bin/env tcsh foreach file... (8 Replies)
Discussion started by: Fred Goldman
8 Replies

8. Shell Programming and Scripting

Help me with this tcsh script.!!!!

I need to write a tcsh script which would compare files in the two folders and then send me a mail saying which of the files are missing.For eg 1) I have this folder1 containing all the files which must land on folder2 on a daily basis. 2) If a file is present in folder1 but not in... (6 Replies)
Discussion started by: kumarsaravana_s
6 Replies

9. Shell Programming and Scripting

how to call a perl script from tcsh?

Hi I am not sure how to call a perl script from a tcsh shell. do i need to set any environment variables? your help is appreciated Thanks (1 Reply)
Discussion started by: megastar
1 Replies

10. Shell Programming and Scripting

History and AutoComplete

Hi, I enabled the Autocomplete of filename by the command set -o emacs But i couldn't enjoy the benifits of vi anymore. i.e I couldn't get the command history by pressing Esc and k. How to enjoy both of this features at a time.? Regards Karthik (3 Replies)
Discussion started by: fermisoft
3 Replies
Login or Register to Ask a Question