|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have been trying to do some unsetenv s
Now some of the variables are pretty long. How do we get around this IS there any way to auto complete any non ambiguous start of a variable in the nev -Parag |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Nov 6, 4:24 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote: > I have been trying to do some unsetenv s > > Now some of the variables are pretty long. How do we get around this > > IS there any way to auto complete any non ambiguous start of a > variable in the nev > -Parag I don't think we have any for expanding environment variables. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
* rthangam is quoted
* & my replies are inline below : > On Nov 6, 4:24 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com> > wrote: >> I have been trying to do some unsetenv s >> >> Now some of the variables are pretty long. How do we get around this >> >> IS there any way to auto complete any non ambiguous start of a >> variable in the nev >> -Parag > > I don't think we have any for expanding environment variables. My Ubuntu Gutsy does, and Dapper did before that. bash-complete is the package name. I hit: $ echo $PAT[tab] and it autocompletes to $ echo $PATH successfully. -- Troy Piggins | http://piggo.com/~troy RLU#415538 ,-O (o- O O ) //\ O `-O V_/_ OOO |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Nov 6, 9:50 am, Troy Piggins <usenet-0...@piggo.com> wrote:
> * rthangam is quoted > * & my replies are inline below : > > > On Nov 6, 4:24 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com> > > wrote: > >> I have been trying to do some unsetenv s > > >> Now some of the variables are pretty long. How do we get around this > > >> IS there any way to auto complete any non ambiguous start of a > >> variable in the nev > >> -Parag > > > I don't think we have any for expanding environment variables. > > My Ubuntu Gutsy does, and Dapper did before that. > bash-complete is the package name. > > I hit: > > $ echo $PAT[tab] > > and it autocompletes to > > $ echo $PATH > > successfully. > > -- > Troy Piggins |http://piggo.com/~troy > RLU#415538 ,-O (o- O > O ) //\ O > `-O V_/_ OOO Sorry for my reply, as Troy pointed out it works fine if you give tab after "$". I tested in tcsh shell ( Red hat Linux ). It works fine |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Nov 6, 9:50 am, Troy Piggins <usenet-0...@piggo.com> wrote:
> * rthangam is quoted > * & my replies are inline below : > > > On Nov 6, 4:24 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com> > > wrote: > >> I have been trying to do some unsetenv s > > >> Now some of the variables are pretty long. How do we get around this > > >> IS there any way to auto complete any non ambiguous start of a > >> variable in the nev > >> -Parag > > > I don't think we have any for expanding environment variables. > > My Ubuntu Gutsy does, and Dapper did before that. > bash-complete is the package name. > > I hit: > > $ echo $PAT[tab] > > and it autocompletes to > > $ echo $PATH > > successfully. > > -- > Troy Piggins |http://piggo.com/~troy > RLU#415538 ,-O (o- O > O ) //\ O > `-O V_/_ OOO Oops sorry for my reply. Like Troy pointed out it is working for environment variables also it works fine in tcsh shell of Linux. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Nov 6, 9:58 am, rthangam <ramesh.thangam...@gmail.com> wrote:
> On Nov 6, 9:50 am, Troy Piggins <usenet-0...@piggo.com> wrote: > > > > > * rthangam is quoted > > * & my replies are inline below : > > > > On Nov 6, 4:24 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com> > > > wrote: > > >> I have been trying to do some unsetenv s > > > >> Now some of the variables are pretty long. How do we get around this > > > >> IS there any way to auto complete any non ambiguous start of a > > >> variable in the nev > > >> -Parag > > > > I don't think we have any for expanding environment variables. > > > My Ubuntu Gutsy does, and Dapper did before that. > > bash-complete is the package name. > > > I hit: > > > $ echo $PAT[tab] > > > and it autocompletes to > > > $ echo $PATH > > > successfully. > > > -- > > Troy Piggins |http://piggo.com/~troy > > RLU#415538 ,-O (o- O > > O ) //\ O > > `-O V_/_ OOO > > Oops sorry for my reply. Like Troy pointed out it is working for > environment variables also > it works fine in tcsh shell of Linux. But nothing for the autocomplete of unsetenvs , coz, we cannot do unsetenv $FO[tab] |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
* parag_paul@hotmail.com is quoted
* & my replies are inline below : > On Nov 6, 9:58 am, rthangam <ramesh.thangam...@gmail.com> wrote: >> On Nov 6, 9:50 am, Troy Piggins <usenet-0...@piggo.com> wrote: >> >> > * rthangam is quoted >> > * & my replies are inline below : >> >> > > On Nov 6, 4:24 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com> >> > > wrote: >> > >> I have been trying to do some unsetenv s >> >> > >> Now some of the variables are pretty long. How do we get around this >> >> > >> IS there any way to auto complete any non ambiguous start of a >> > >> variable in the nev >> > >> -Parag >> >> > > I don't think we have any for expanding environment variables. >> >> > My Ubuntu Gutsy does, and Dapper did before that. >> > bash-complete is the package name. >> >> > I hit: >> >> > $ echo $PAT[tab] >> >> > and it autocompletes to >> >> > $ echo $PATH >> >> > successfully. >> >> Oops sorry for my reply. Like Troy pointed out it is working for >> environment variables also >> it works fine in tcsh shell of Linux. > > But nothing for the autocomplete of unsetenvs , coz, we cannot do > unsetenv $FO[tab] I don't have the unsetenv command, but if I try $ unset PAT[tab] it works. It is autocompleting what the command would actually be. eg 'echo' expects variables in the form $PATH, while 'unset' expects just PATH. Not sure what unsetenv takes as args. And of course the variables must exist and be set. What is the output of $ echo $FO_whatever_the_variable_name_is -- Troy Piggins | http://piggo.com/~troy RLU#415538 ,-O (o- O O ) //\ O `-O V_/_ OOO |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On 2007-11-05, parag_paul@hotmail.com wrote:
> > > I have been trying to do some unsetenv s > > Now some of the variables are pretty long. How do we get around this > > IS there any way to auto complete any non ambiguous start of a > variable in the nev If you are using bash, just press tab, as for other forms of completion. -- Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ===== My code in this post, if any, assumes the POSIX locale ===== and is released under the GNU General Public Licence |
|
![]() |
| Outils de la discussion | |
|
|