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
ADVERTISEMENT
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
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
Aug 4, 2010
Are there shell versions that have a more intelligent tab completion? I'd like to be able to type cd foo-<TAB> Then it would show me the possible completions along with numbers that I can type to select one of them:
cd foo-<TAB>
(1) foo-bar1 (2) foo-bar2 (3) foo-bad
So, after <TAB> I would type 3 and it would take me to foo-bad. Alternatively, using the arrow keys instead of typing the number would be fine.
View 2 Replies
View Related
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
View Related
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
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
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
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
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
Jul 12, 2011
Can fedora do bash completion of package names in yum?
View 4 Replies
View Related
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
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
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
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
Feb 3, 2010
whenever I try and boot the computer begins to load correctly, but after the scrolling ubuntu splash, I just get a black screen.
64bit Ubuntu 9.10
View 6 Replies
View Related
Apr 28, 2011
I've tried about a billion times to get this to install correctly to no avail. This is the amd64 desktop edition, but I've tried with the 32 bit as well. I have a lenovo W500. The system never boots off the USB. It gets through a bit, with text output, and then stops. Sometimes it doesn't even give an error message, and other times I get something like udev failed while loading some pci device. I've tried re-downloading the iso several times, different USB keys, different USB key creators, CDs, to no avail.
I then thought, well, heck with it, I'll just install 10.10 and upgrade. Nope, there's a GPG key error for some bizarre reason, which is tripping up apt, but it's not going to tell me what key that is so I can go and get it (and apt-key update does nothing). Command line upgrades fail similarly. So finally, I go for broke and try to just install the thing with Wubi. Of course, that eventually crashes too.
View 1 Replies
View Related
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
Jul 24, 2010
I get a complete system failure when my CPU is stressed. It's not the temperature because when it crashes the CPU temp is only ~55 C. When it crashes the video freezes but the sound repeats itself. Example. I start handbraking a movie, then open a tv show in VLC. This is what I hear.
Did you get that tire - then it freezes
get that tire
get that tire
get that tire
get that tire
... etc
That continues until I reboot my computer. This crash is pretty reliable, as every time I load my CPU that happens. If I don't do anything CPU intensive, I don't get the crash. Also, if I only load up one core of my CPU, then everything is fine. However if I run something such as prime95 or handbrake (which both utilize all 4 of my cores) the computer will crash within 30 seconds.
Ubuntu 10.04
Corsair 750 TX PSU
AMD Phenom x4 @ 2.3 GHz
4 GB G.Skill 1066 DDR2 Memory
Nvidia GTS 250 1 GB edition
Biostar AMD 770 AM2+/AM2 Motherboard
Three HDs, two are WD of 1 TB and 120 GB, and a 32 GB SSD.
View 6 Replies
View Related
Sep 11, 2010
.After trying to instal 10.40 as a "guest" of Windows7 in its own partition on drive D I got all the way thru then re-booted to finish the install as requested. At that point after reboot I selected Ubuntu from the boot menu then it hung up after quickly displaying and overwriting some option numbers - probably for GRUB
I uninstalled 10.40 then tried Ubuntu 9.4. It worked better and gave me an option menu after the install reboot. If I chose "normal" it also hung up.I was succesful by chosing one of the other GRUB choices that it gave me.Now everything works but with an older version.
View 2 Replies
View Related
Jan 15, 2010
I have installed ubuntu 9.10 with karmic kernel and GNOME, on toshiba 512 MB RAm laptop. it worked fine but some times after complete shut down or sleep, it wont boot again. Laptop is completely dead and silent. I had to power it off, battery taken out and inserted again to get it started again. Then it worked all normal and fine. Why it happens and what i shud do next?
View 7 Replies
View Related
Apr 23, 2011
I have a site hosted with a cheap hosting company and limited control of the site. I need to allow some other users all over the world to have write access to files or complete directories and I have no idea how to do that. Initially I thought I could use "chown" somehow but it looks like it's a no-go with ftp and others. By default, there is a .htaccess file and a .htpasswd file in the root directory of the site and the hosting company suggested to use .htaccess file with something like below:
[Code]....
and put it in a .htaccess file in the directory of user1 but the server does not like something since I inserted that file. Is it an error in the script or is there more to it than that? Can someone point me to a suitable tutorial or explain what to do?
View 5 Replies
View Related
Jan 29, 2011
I have been researching the web for a program which will allow me to backup my entire hard drive so that I can restore my system if need be. I am however unsure which is the best one to use if I want to achieve this:Somehow I want to back up my hard drive containing my ubuntu system byte for byte so that if the hard drive were to fail I could simply go to the store, get a new hard drive, restore my backup and be up and running again without having to do any re installments of ubuntu or any other programs for that matter.
What is the easiest program that does this? I would like it to support incremental backup.rsync with the "Back in Time interface"?bacula?
View 8 Replies
View Related
Oct 15, 2010
latest update to 11.3 a complete failure afterwards on reboot I'm instructed that I must first install kernel and to strike any key to exit which return me to grub menu. thats it for me and Osuse. 11.3 has been one bug after another and to much for me overcome. I will return once a day to see if anyone can fix this/
View 9 Replies
View Related
Jan 16, 2011
I saw a post where you were faceing "Type s for swith or M or mannual restore"
I got the same message. I tried S but nthing happend then I tried M. it took me to root@ubuntu:/#
How i restore it manunally or if not possible I need to back up the data to pend drive
but i cant find the pendrive in the home section.
View 2 Replies
View Related
Jan 15, 2010
I've got an annoying problem that 'man' and some other commands do not auto-complete (via TAB). e.g. typing: man rsyn (TAB, TAB, TAB, etc) will not auto-complete to 'man rsync' however, if i 'sudo -s' & then try the above, 'man' auto-completes everytime. (Directories always auto-complete successfully) My ~/.bashrc contains:
Code:
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
[code]....
View 8 Replies
View Related
Jul 31, 2010
For as long as i can remember, using arrows (and home/end) in a bash shell that has a command running would print some fancy ^[[A caracters and then return the prompt at the end of this.
Now this behavior has changed. Using the arrows while a command is running actually moves the cursor on the screen. When the command completes the prompt appears at the new cursor position which is kind of strange and messes the screen.
For testing, just enter "sleep 10" and during the wait move the cursor with the arrows and home/end.
How can i get back the original behavior?
> rpm -q bash
bash-4.1.7-1.fc13.x86_64
View 2 Replies
View Related
Mar 5, 2010
No wonder my network-career is not getting in the mood... always other trouble.
Thing is: reboot and ended with a black screen: "no video available". i hit the reboot button. same result. I just, today, added a new DVD/Read-Write, so i have assumed thats the problem. Unplugged it: same problem. Nothing, not even the BIOS-display.
As i once started a PC without keyboard connected i did remember that that doesn't work (if i recall correct it gave me some beeps, today nothing like a beep). I replaced the keyboard and could boot.
But i don't trust this result. If someone might give an experienced opinion i would be very glad (i got several pc's, but this one is the only one which is really usuable, though its still a 200€ one, but it does all i need).
View 14 Replies
View Related
Jun 28, 2011
I'm very new to working with the terminal on my macbook pro and am trying to understand how to navigate into certain directories with it. I can't seem to get out of my username directory. I'm trying to access MAMP/htdocs and get those files into my git repository. I'm new to all of this. I am typing and getting this:
David-Adamss-MacBook-Pro:~ davidadams$ cd Applications/MAMP/htdocs/barcodes
-bash: cd: Applications/MAMP/htdocs/barcodes: No such file or directory
I need to get the "davidadams$" out of that line but I don't know how to navigate out of it.
View 6 Replies
View Related
Feb 11, 2011
It achieves a bash script that takes two parameters (command line). These two parameters must be two paths of two directories (existing, and different such as not being of the other sub-folder). Path1 and path2 are for simplicity.The script will recursively visit the two directories and all sub-directories, sub-sub-directories, etc.. Looking for differences between their contents (files or directories). In particular, suppose that we work with both path1 and path2 directory, and scanned the files contained therein. These situations can occur:
* Path1 exists in a file that is not present in path2: in this case, the script displays the path of the file to you (print screen) and asks if he wants the file is copied in path2 or not. Reads the user's response and acts accordingly.
* Path2 exists in a file that is not present in path1: in this case, the script displays the path of the file and asks if the user wants the file is copied in path1 or not. Reads the user's response and acts accordingly.
* Both path1 path2 in a file with the same name but different contents: in this case, the script displays the path of the two files (which of course will start with path1 and path2 but end with an equal) to the user together with the two dates have been changed last time. Then asks if you want the file to be replaced by one in path1 path2, or that the file is replaced by one in path2 path1, or that both are left unchanged. Reads the user's response and acts accordingly.
* Both path1 path2 in a file with the same name and same content, in which case the script does nothing and proceeds with the next file.This is done for all regular files in path1 and path2. The special file (socket, device, symbolic link ...) are ignored. For folders in path1 and path2 is recursively by:
* Path1 if there is a folder that is not present in path2: in this case, the script displays the path to the folder and asks if you want the folder and all its contents are copied to path2. Reads the user's response and acts accordingly.
* Path1 if there is a folder that is not present in path2: similar at first.
* Both path1 path2 that there are two folders with the same name as the script works recursively on the two folders.
View 2 Replies
View Related