Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 24-03-2006, 02:21 AM   #1 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default any ideas about these commands-- "_alias"


I just tried in my dapper typing a "_" underscore and double clicked the TAB button.it displayed below all commands:
Code:
prakash@dapper:~$ _
Display all 151 possibilities? (y or n)
_alias                         _lvresize
_apt_cache                     _lvs
_apt_get                       _lvscan
_aptitude                      _make
_args                          _man
_aspell                        _mkisofs
_aspell_dictionary             _modules
_available_interfaces          _mount
_bzip2                         _mplayer
_cancel                        _mplayer_options_list
_cardctl                       _nslookup
_cd                            _ntpdate
_cdrecord                      _ooexp_
_chgrp                         _openssl
_chown                         _openssl_sections
_chsh                          _perl
_command                       _perldoc.........etc
what does these stands for anything like env variables :roll: waiting brainiacs and geeks for an answer....
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 24-03-2006, 03:00 AM   #2 (permalink)
Wise Old Owl
 
desertwind's Avatar
 
Join Date: Nov 2004
Location: Hyderabad
Posts: 1,096
Default

There are all used in zsh. A "_" parameter is set in the environment of every command executed to the full pathname of the command. ie _alias means it is the environment variable for the command alias.
__________________
Sometime you'll think you understand everything

...Then you'll regain consciousness
desertwind is offline  
Old 24-03-2006, 03:26 AM   #3 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default

But i dont have zsh or any installed only bash and sh...any resources...
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 24-03-2006, 09:37 AM   #4 (permalink)
Wise Old Owl
 
vignesh's Avatar
 
Join Date: Jul 2004
Location: Chennai
Posts: 1,659
Default

zsh is installed by default..
vignesh is offline  
Old 24-03-2006, 01:22 PM   #5 (permalink)
FooBar Guy
 
GNUrag's Avatar
 
Join Date: Jun 2004
Location: GNUmbai
Posts: 1,245
Default

prakash, these _alias and things are shell functions which are activated if you are using Bash Autocompletion features, normally by uncommenting its entry in $HOME/.bashrc

Open your /etc/bash_completion file and you will find all the function's bodies defined there.
__________________
- --
http://web.gnuer.org
GNUrag is offline  
Old 24-03-2006, 05:46 PM   #6 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default

1.My bashrc says...
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

2. There is no file as /etc/bash_completion in ma distro (FC4)

How to do it then?...Please tell me
One thing more what is this bashcompletion?
mediator is offline  
Old 24-03-2006, 06:11 PM   #7 (permalink)
FooBar Guy
 
GNUrag's Avatar
 
Join Date: Jun 2004
Location: GNUmbai
Posts: 1,245
Default

@mediator, bash_completion Auto complete features are available for Debian and distros directly based on it.

Bash_Completion provides second level and in some cases third level command line autocompletion features, not present in RH based distros.
__________________
- --
http://web.gnuer.org
GNUrag is offline  
Old 25-03-2006, 01:40 PM   #8 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default

Quote:
Originally Posted by GNUrag
prakash, these _alias and things are shell functions which are activated if you are using Bash Autocompletion features, normally by uncommenting its entry in $HOME/.bashrc

Open your /etc/bash_completion file and you will find all the function's bodies defined there.
Thanks Anurag.i already enabled bash autocompletion in debian and ubuntu
Code:
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi
and i checked /etc/bash_completion file its there.anyway helped me so;ved a big doubt
@mediator:
for fedora/RH you need to get bashcompletion rpm installed for full programmable completion bash.here is one link for your distro:
http://ftp.belnet.be/packages/dries.....rf.noarch.rpm
check atrmps.net,dries,livna,dag's,rpmfind,rpmforge repos for more updated rpms.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 25-03-2006, 02:56 PM   #9 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default

@prakashkerela : Thanx for the link bro...i'll check dat out!
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 26-03-2006, 12:57 AM   #10 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default

Now i downloaded and installed the rpm , now what to do?
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 26-03-2006, 02:33 AM   #11 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default

the purpose of that rpm was not clear to you,I think.bash autocompletion is for normal bash users,suppose at # or $ prompt if u type a commands first few words,like for eg;if you typed update and pressed keyboard TAB button twice when bash terminal window is active will show u available options.below is for my sarge's bash.

Code:
prakash@sarge:~$ update (TAB doubleclicked)
updatedb                 update-menus             update-pciids
updatedb.notslocate      update-menus.real
update-desktop-database  update-mime-database
now if itype in terminal prompt "updated" and presses the TAB,it will complete the command to "updatedb".this is primary command completion in bash.if u have programmable bash completion installed/enabled if u want to restart ur network.in most distros u need to type
Code:
sarge:~# service network restart
or /etc/init.d/network restart.see if u simply type service in root prompt and double click TAB Button it will list u available services in /etc/init.d/ directory..see below
Code:
sarge:~# service (double clicked TAB)
README             echo               lm-sensors         rmnologin
acpid              exim4              makedev            scsitools-pre.sh
alsa               firestarter        microcode.ctl      scsitools.sh
alsa-utils         gdm                module-init-tools  sendsigs
anacron            gpm                modutils           setmixer
apmd               halt               mountall.sh        single
atd                hddtemp            mountnfs.sh        skeleton
binfmt-support     hdparm             mountvirtfs        smartmontools
bootclean.sh       hibernate          netapplet          stop-bootlogd
bootlogd           hostname.sh        networking         sudo
bootmisc.sh        hwclock.sh         ntpdate            sysklogd
chargen            hwclockfirst.sh    nviboot            sysstat
checkfs.sh         hwtools            portmap            time
checkroot.sh       ifplugd            powertweakd ....etc etc
this is only possible with bash programmable completion enabled.
like this secondary programmable bah completion is very useful.another example is if u want to "modprobe" a module by using bashprogrmablecompletion double click TAB will list u all the modules available..or with any other commands like "modinfo"
Code:
sarge:~# modinfo
Display all 1631 possibilities? (y or n)
for above there are a huge list of modules to list.if u press 'y' in kbd it will be listed using the more command.just read tldp.org guides for more details.
for ubuntu and debian users "service" command may not be available with a fresh install.so " apt-get update && apt-get install sysvconfig"
will provide u a "service" option
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 26-03-2006, 03:42 AM   #12 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default

ok thanx i get it now!
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 26-03-2006, 08:50 AM   #13 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default

if u want to learn more on bash shell,an easy howto is in tldp:
http://www.tldp.org/LDP/Bash-Beginne...ners-Guide.pdf
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by icebags
- by Sujeet
- by clinton
- by topgear

Advertisement




All times are GMT +5.5. The time now is 10:23 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2