LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-02-2007, 06:50 AM   #1
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
Tab completion for sudo


How to get TAB completion to work with sudo? I have it working just fine without it but when I try to use sudo I have to type the full command names manually without completion.
I'm using zsh.
 
Old 06-02-2007, 09:17 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
/usr/share/zsh/4.3.4/functions/Completion/Unix/_sudo:
Code:
#compdef sudo

_arguments \
       '-V[show version]' \
       '-l[list allowed commands]' \
       '-L[list options from Default section]' \
       '-h[show help]' \
       '-v[validate user timestamp]' \
       '-k[invalidate user timestamp]' \
       '-K[remove user timestamp]' \
       '-b[run command in background]' \
       '-r[Kerberos realm]:Kerberos realm:' \
       '-p[password prompt]:password prompt:' \
       '-u[user name]:user name:_users' \
       '-s[run SHELL]' \
       '-H[set HOME environment variable]' \
       '-S[read password from stdin]' \
       '(-):command name: _command_names -e'  \
       '*::arguments: _normal'
This is what Debian installs for it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tab completion with sudo extrasolar Slackware 8 08-22-2006 02:46 PM
adding an option to a 'tab' completion + ls whatnoname Linux - Newbie 2 06-07-2005 07:32 AM
tab completion with scp fsbooks Linux - General 5 04-07-2005 03:13 PM
How can I turn on/install tab completion which I am so used to. jimdaworm *BSD 2 04-06-2005 11:25 PM
apt-get tab completion atheist Debian 6 06-11-2004 08:25 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration