LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   linux (https://www.linuxquestions.org/questions/linux-general-1/linux-12946/)

aparna 01-29-2002 01:10 AM

linux
 
hai..
i created one virtual console for my linux platform.what ever command i'm entering in that virtual console i'm executing and storing in side a file for my work .the problem is that"WHEN EVER I TYPE HALF THE COMMAND (eg:'l' for 'ls' command) AND PRESS TAB IT IS NOT LISTING THE WHOLE COMMAND.INSTEAD THE CURSOR IS MOVING ACCORDING TO THE TAB PRESSING..is there any solution for that????
thanking you aparna.

dorward 01-29-2002 01:25 AM

It sounds like you are using csh or sh as your shell. Type "bash".

For a longer term solution I'm not sure what to do, how did you go about setting up this "virtual console"?

aparna 01-29-2002 03:00 AM

hello sir..
thanks for your reply.what i meant by virtual console is that i created a c program in which i'm creating a console by my own with home directory and current directory and with a # symbol.i'm using this to find whether the entered person is an intruder or not.
so i have to get the same functionality which is used by all shells to display all commands starting with that letter when we press tab after that particular letter.can you help me
thanking you ...aparna

acid_kewpie 01-29-2002 03:22 AM

well then you'd need to write that feature yourself, it's part of bash...

webboss 01-29-2002 03:33 AM

a guess to answer U
 
Hello Aparna,
I guess U can use 'grep' command to grab all the executable commands from bin or sbin folder and associate them with thehalf typed command and the tab sequence.

I hope it may work fine. Though am not a serous C programmer. But I have learned C and currently using linux like anything. Working on getting samba up and running with the shares on linux box. Anyway.
Hope it solves your problem. all the best
Rajesh.

aparna 01-30-2002 12:36 AM

i used grep to list all the commands .it's working .but the problem is that whem i press the tab the cursor is moving.so it's not giving the real console appearence.in the real console when we press tab it listing commands with out moving the cursor .
how can set that property in my virtual console..
help me plaese....thank you
aparna

febisfebi 01-30-2002 12:54 AM

that is a function of bash, in order to have that in ut program i would suspect u would either somehow integrate bash into it, or write the function yourself.


All times are GMT -5. The time now is 06:42 AM.