Ubuntu :: No Bash Completion With Sudo?

Apr 29, 2010

Just installed 10.04 64bit and in gnome-terminal i have no bash completion when sudo is used.For example:apt- gives apt-getbut sudo apt- does nothing, i get no suggestions from the terminal.

View 6 Replies


ADVERTISEMENT

General :: Make Zsh Completion Behave Like Bash Completion?

Jun 2, 2010

I switched to zsh, but I dislike the completion. If I have 20 files, each with a shared prefix, on pressing tab, zsh will fully complete the first file, then continue going through the list with each press of tab. If I want one near the end, I would have to press tab many times.

In bash, this was simple - press tab and I would get the prefix. If I continued typing (and pressing tab), bash would complete as far as it could be certain of. I find this behavior to be much more intuitive but prefer the other features of zsh to bash.

Is there a way to get this style of completion? Google suggested setopt bash_autolist, but this had no effect for me (and no error message was printed upon starting my shell).

View 1 Replies View Related

Ubuntu Servers :: JeOS 8.04 And Sudo Tab Completion?

Mar 3, 2010

how to get tab completion working with sudo in JeOS (Ubuntu Hardy) 8.04? Assuming I have the command '/usr/bin/svnadmin'. As a normal user I can type:

Code:
svnad + TAB
and it auto-completes as 'svnadmin'. If I type:
Code:
sudo svnad + TAB
nothing happens. My 'echo $SHELL' is '/bin/bash'. I tried enabling the following in '/etc/bash.bashrc':
Code:
if [ -f /etc/bash_completion ]; then

[Code]...

auto-completes as I'd expect. I think I once read that there's some kind of configuration variable for sudo that causes it to use a 'more secure' path rather than the current path in the user's environment. I can't find any info on it though. I'm executing the commands from my home directory.

View 5 Replies View Related

Ubuntu :: Bash Completion With Leading Wildcard?

Jul 17, 2010

Out of the box, Bash in 10.04 is configured such that it won't expand/complete parameters when there's a single match for a parameter with a leading wildcard. For example, if I have the following files in a directory:

Code:

ABC.bin
DEF.bin
GHI.bin

...and I type cp *E*, I expect to be able to press TAB and have Bash expand *E* to DEF.bin, since that's the only file in the directory with a capital E in its name.

(Note: if I actually submit the command with the wildcards in place, the correct file will be used then, but I don't get to see it beforehand.) I imagine there's something in /etc/bash_completion that's preventing this from working properly. Does anyone know what it is?

View 1 Replies View Related

Ubuntu :: Turn On Bash Smart Completion?

Aug 26, 2010

[URL]

Code:
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi

What versions of Ubuntu have this commented out? Every version I have used always has this uncommented.

View 1 Replies View Related

Fedora :: SSH Knowhost Bash Completion In F12?

Dec 10, 2009

New Fedora 12 install - I installed the bash_completion package, but it's not filling in knowhosts for ssh. It worked fine in Fedora 11. Is there something I've done wrong, or is this missing in F12?

View 6 Replies View Related

General :: Making Bash TAB Completion More Like Cmd.exe?

Dec 15, 2010

I wondered if theres a way to do rotational style completion in bash similar to the behavoir on cmd.exe, I've found it speeds me up in regard to entering commands

View 2 Replies View Related

Software :: No Bash Completion With Apt In Su Session?

Mar 28, 2011

I have disabled root ssh logins for security. When I am logged in as a normal user over SSH and do a su into root the tab-completion stops working with apt. It still works when doing normal file-browsing, on the original user1, and it has worked previously when logged directly into root. How do I make it autocomplete again? I am using Debian Stable on a headless homeserver.

View 3 Replies View Related

Fedora :: Do Bash Completion Of Package Names In Yum?

Jul 12, 2011

Can fedora do bash completion of package names in yum?

View 4 Replies View Related

General :: Handling Wordbreaks In Bash Completion?

Feb 16, 2010

I am writing completion function for one PHP framework called symfony. It has command line interface with syntax:

Code:

symfony [options] [namespace:]action

I want to make action be autocompletable. The function is simplest so far:

Code:

function _symfony_commands()
{
[ -r "cache/completion/.sf" ] && cat cache/completion/.sf
}

[code]....

But, if there is : symbol which separate namespace from action problems coming:

symfony doct[TAB]
will be completed to
symfony doctrine:

But nothing happens if you want complete after : symbol. I've found out that for readline there is three words because it splits line with $COMP_WORDBREAKS

Code:

$ echo $COMP_WORDBREAKS
"'><=;|&(:

I played with $COMP_WORDS array and tried every thought I had to make it work, but failed.
What I should do to escape colon and make readline consider it as one word? Or there is way perhaps to workaround it?

View 2 Replies View Related

Software :: Bash Hostname Completion Not Working?

Nov 25, 2009

According to the Bash man pages, Quote: HOSTFILE Contains the name of a file in the same format as /etc/hosts that should be read when the shell needs to complete a hostname. The list of possible hostname completions may be changed while the shell is running; the next time hostname completion is attempted after the value is changed, bash adds the contents of the new file to the existing list. If HOSTFILE is set, but has no value, bash attempts to read /etc/hosts to obtain the list of possible hostname completions. When HOSTFILE is unset, the hostname list is cleared.

Here's the line in my .bashrc where HOSTFILE is set:

Code:

export HOSTFILE="~/.hosts"

I opened a new bash session, created ~/.hosts, filled it with the names of servers that I wanted to expand using tab completion. then typed

Code:

ssh p<tab><tab>

expecting to get a lists of all of the hosts in ~/.hosts starting with 'p'. Bash simply beeped at me twice.

I tried

Code:

$ shopt hostcomplete
hostcomplete on

Code:

ssh bchittenden@p<tab><tab>

same results.

[code].....

View 2 Replies View Related

Ubuntu :: Bash-completion + Mount = Failure To Complete Directories?

May 27, 2011

I've spent some time searching for answers to this and I haven't found much at all.Please feel free to post pointers to other threads that discuss this particular problem, if you find any.The problem is that in bash I want to mount an iso file to inspect the contents with the command:Code:sudo mount myCD.iso CDMount -o loopThe command works fine, but pressing tab to complete either the iso filename or the CDMount directory does not work. The completion suggestions I get are existing mountpoints which The completion suggestions should include the files and directories in the current directory. This worked with Ubuntu 10.04 and not with 11.04.

View 1 Replies View Related

General :: Bash - Get Colored Output When Using Tab Completion In A Terminal?

Feb 27, 2011

Is there a way to get colored output when using tab completion in a terminal? My colors are fine everywhere else so I know that I've enabled a color terminal successfully. Using bash in Ubuntu (10.10).

View 1 Replies View Related

General :: Tab-Completion In Bash Indexing System Folders?

Nov 15, 2010

tab-completion indexes system folders (like /usr/bin, /usr/local/bin)! so say i'm in a folder that has two files, 'text' and 'myprog', i type in an 'm' then tab, and i get hundreds of results including 'mysql', 'mysqlconfig', and others as im sure you can imagine. is there a way to set it to default or something else that will only make it index the current folder?

i tried changing my PATH variable so i could execute programs in the current directory without './' - what i added to PATH was ':.' at the end (apparently this is not the way to do it... :S). i tried resetting PATH various times ('unset PATH', 'PATH=$whatever...') but this has not fixed the problem. using 'unset PATH', of course, removes everything from PATH, which meant that functions (like 'ls') in /usr/bin and /usr/local/bin can't be found. obviously i want those to be found, but i would rather not tab through them!

View 2 Replies View Related

Slackware :: Bash-completion-1.3-noarch-1 Causes Xorg Failure?

Feb 16, 2011

/etc/bash_completion.d/slapt has a syntax error that causes x to fail to load. I had to move the file to be able to run x. Here is the offending file:

[URL]

View 12 Replies View Related

Programming :: Bash Checking For File Write Completion Before Acting?

Jan 20, 2011

I have a bash script that checks for contents in a folder every 15 seconds and then acts on it's contents. This works great for the average size file however on very large files it starts acting on the file before it's completely written. Is there a facility in bash shell to get a file complete signal or such? here is trigger to launch a larger script.

Code:

#!/bin/sh
while true
do
$HOME/bin/hpgl.sh >/dev/null 2>&1 &

[code].....

View 10 Replies View Related

Programming :: SU And Sudo Within Bash Script

Oct 27, 2010

I'm working on a script which handles disaster recovery for a system I'm developing. Part of the script will also be used for initial setup. It needs to require as little user interaction as possible. It also needs to be run as root during most of the process. The problem is that there comes a point where some of the software can't be compiled or installed as root. So root needs to su to a regular user who then has to sudo in order to compile & install the aforementioned software. After all this, the script needs to revert to it's original state, running as root. I've never encountered a situation where root had to su to a normal user in order to sudo as root.

View 4 Replies View Related

Ubuntu :: Bash Sudo Scripts Fail To Work After Install Of 10.04

Aug 4, 2010

I had some bash scripts on Ubuntu 09.10 (mint version) that fail to work on Ubuntu 10.04. The line that fails is the following:

Code: # cat file_with_my-password.txt > sudo -S something cat: invalid option -- 'S' Try `cat --help' for more information. In my case "something" mounts some filesystems (that fail to load from fstab - bios "fake" raid 10), but I get the same error for any sudo command. It is the same script that used to work under 09.04 :-/

View 2 Replies View Related

Fedora :: Run (not Run In Terminal) Bash Script With Sudo In It?

Jul 6, 2010

I have written a tiny script which switches between 2 CPU frequency throttling governors. Now I need to assign it to a shorcut key though "Preferences->Keyboard Shortcuts".

Here is the script:

Code:

#!/bin/bash
if [ `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` = 'ondemand' ]
then

[code]....

As you can see this script involves sudo. I know that usually running commands with sudo requires "Run in Terminal" option for a shortcut, but in "Keyboard Shortcuts->Add" there is no option to run command in terminal. When I double click on the script and choose "Run in Terminal", then it functions as it should. How can I make this script execute by doing "Run" and not "Run in Termnal"?

View 2 Replies View Related

General :: Sudo Apt-Get Update And Bash Script

Aug 9, 2011

If I call a bash script with sudo, for example:
sudo bash script.sh
Do I still have to use sudo inside the script in cases like this:
sudo apt-get update

View 2 Replies View Related

Ubuntu :: Creating A Text File To Start Up Sudo Bash Without Going To The Terminal?

Feb 26, 2011

I just set up apache on my PC and I cant change the permissions by right clicking because "I'm not the owner" and instead of using the chmod command on every file that I would like to edit I would just like to write a script on a text file, save it to my desktop so all I have to do is double click on it and boom I can edit all my files, etc.

View 2 Replies View Related

Programming :: Bash Scripting With Sudo / Password Prompt And Accepting User Input?

Jul 30, 2011

I'm creating a bash script to do some tasks for me. I would like the script to be run at a set time of everyday. My first question is if it is possible that if one of the commands in the script requires sudo, is there a way to get around it with out making sudo not require a password. Such as, is there a way to include the password in the script? If that is the case, I can always just set the file as read only by sudo. I've been looking for a way to do this, with no success. if I have a command that wants input, how do I give it to the program. For example, if I want to make a zip file that is encrypted, the command would go as:

Code:

zip -r example * -e

now how would I get the script to insert my wanted password.

View 14 Replies View Related

Ubuntu :: 11.04 "bash: Sudo: No Such File Or Directory"?

Jul 9, 2011

This is the same with git. I'm not sure if any other commands are like this, but I know that both of those commands are installed.

View 9 Replies View Related

Ubuntu :: Sudo Ifconfig Eth0 Down Vs Sudo /etc/init.d/networking Stop

Jun 10, 2010

explain the difference between these two commands. I'm currently reading about changing your mac address and both of these commands show up a lot. They sound like the same thing to me. Is one better than the other, or do you need to use both to change your mac address?

Code:
sudo ifconfig eth0 down
sudo /etc/init.d/networking stop

View 3 Replies View Related

Software :: Pam_start Error 26 \ Use Sudo Su And Add An Account To A Group What's Allowed To Use Sudo?

Jan 2, 2011

I have a problem when I want to use su I get this error:Code:su: pam_start: error 26I have googled it so I found this topic (http://www.linuxquestions.org/questi...r-26-a-615024/) but it didn't really help me. There was a reply on that topic and his question was what the output of this was:

Code:
ldd /usr/bin/passwd
and

[code]....

View 4 Replies View Related

Fedora Security :: Cannot Open /var/db/sudo After Sudo Package Upgrade?

Sep 16, 2010

A day ago I finally got around to upgrading the PackageKit installation that had been sitting for a week and a half, so I found a new upgrade for sudo available - the one that gives the sudoreplay command, I forget which version number it is exactly. When I try to use the sudo command I get this notice in my terminal:Code:Can't open /var/db/sudo/me/1: Permission deniedI didn't get it before. What do I have to do to make it open? I'm using SELinux in enforcing mode if that helps.

View 1 Replies View Related

Ubuntu :: .bashrc Function Tab Completion?

Jul 4, 2010

I tried to make a function to put in either my .bash_aliases or .bashrc file to make a local backup of a file, but when I call the function and try to use tab completion I get the following error:

Code:
cp: cannot stat `help': No such file or directory
The function I added is as follows:
Code:
function bk

[Code]...

Also interestingly, if I define this function at the prompt rather than in my .bashrc, tab completion works fine.

View 3 Replies View Related

Ubuntu :: Make Sudo Act More Like The Debian Sudo?

Jul 2, 2011

I have read a lot of questions from people wanting to take Debian (or some other distribution) and make its sudo command act more like the way Ubuntu's sudo does. I want to do the exact opposite, I want to make Ubuntu's sudo command act more like the sudo command from another distribution. ie I want there to be one root password

View 8 Replies View Related

General :: Sudo Cd /root Gives Sudo - Cd - Command Not Found

Jan 6, 2011

Kernel 2.6.21.5, Slackware 12.0

Code:

Code:

On the other hand

Code:

So, I do not understand why the notification "sudo: cd: command not found", considering cd is a bash built-in command.

View 3 Replies View Related

Ubuntu :: Eclipse Freezes During Code Completion?

Jul 3, 2010

my version of Java is "1.6.0_20", it is the Java from package sun-java6-jdk from the repository.Version of Eclipse is 3.5.2 Galileo (but the new Helios has the same problem)The problem is that code completion (ctrl + space) freezes the Eclipse everytime I want to use it. There is nothing in the log (${WORKSPACE}./metadata/.log) and it seems to me like deadlock or something. When I run the Eclipse as root the problem don't occur.I tried to create new workspace, reinstall the eclipse,

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved