VirtualBox

Opened 16 years ago

Closed 8 years ago

#2951 closed defect (obsolete)

bash_completion doesn't know how to complete directories on a vboxsf mount

Reported by: Yann Owned by:
Component: shared folders Version: VirtualBox 2.1.0
Keywords: bash_completion compgen bash vboxsf Cc:
Guest type: Linux Host type: Mac OS X

Description (last modified by aeichner)

Hi,

I tend to believe it's a vboxsf defect, but I don't have any proof... I marked this ticket at 'minor', but it's rather annoying.

The problem is that directories under vboxsf mount autocompletes with a space instead of a '/' for certain commands (rm, ls)

and with nothing for cd (instead of '/' again)

Here is what I see:

yann@dev:~/dev$ mkdir -p /tmp/xxx/yyy/zzz
yann@dev:~/dev$ mkdir -p xxx/yyy/zzz
yann@dev:~/dev$ set -x
yann@dev:~/dev$ ls /tmp/xxx/y+ local cur opt
++ _get_cword
++ [[ 10 -eq 0 ]]
++ [[ 13 == \13 ]]
++ echo /tmp/xxx/y
+ cur=/tmp/xxx/y
+ [[ /tmp/xxx/y == --*=* ]]
+ [[ /tmp/xxx/y == -* ]]
+ [[ ls == @(mk|rm)dir ]]
+ _filedir
+ local 'IFS=   
' xspec
+ _expand
+ [[ /tmp/xxx/y == \~*/* ]]
+ [[ /tmp/xxx/y == \~* ]]
+ toks=()
+ local toks tmp
+ read -r tmp
+++ quote_readline /tmp/xxx/y
+++ local t=/tmp/xxx/y
+++ echo ''\''/tmp/xxx/y'\'''
++ compgen -d -- ''\''/tmp/xxx/y'\'''
+ [[ -n /tmp/xxx/yyy ]]
+ toks[${#toks[@]}]=/tmp/xxx/yyy
+ read -r tmp
+ [[ '' != -d ]]
+ xspec=
+ read -r tmp
+++ quote_readline /tmp/xxx/y
+++ local t=/tmp/xxx/y
+++ echo ''\''/tmp/xxx/y'\'''
++ compgen -f -X '' -- ''\''/tmp/xxx/y'\'''
+ [[ -n /tmp/xxx/yyy ]]
+ toks[${#toks[@]}]=/tmp/xxx/yyy
+ read -r tmp
+ COMPREPLY=("${COMPREPLY[@]}" "${toks[@]}")
yy/

yann@dev:~/dev$ ls xxx/y+ local cur opt
++ _get_cword
++ [[ 5 -eq 0 ]]
++ [[ 8 == \8 ]]
++ echo xxx/y
+ cur=xxx/y
+ [[ xxx/y == --*=* ]]
+ [[ xxx/y == -* ]]
+ [[ ls == @(mk|rm)dir ]]
+ _filedir
+ local 'IFS=   
' xspec
+ _expand
+ [[ xxx/y == \~*/* ]]
+ [[ xxx/y == \~* ]]
+ toks=()
+ local toks tmp
+ read -r tmp
+++ quote_readline xxx/y
+++ local t=xxx/y
+++ echo ''\''xxx/y'\'''
++ compgen -d -- ''\''xxx/y'\'''
+ [[ -n xxx/yyy ]]
+ toks[${#toks[@]}]=xxx/yyy
+ read -r tmp
+ [[ '' != -d ]]
+ xspec=
+ read -r tmp
+++ quote_readline xxx/y
+++ local t=xxx/y
+++ echo ''\''xxx/y'\'''
++ compgen -f -X '' -- ''\''xxx/y'\'''
+ [[ -n xxx/yyy ]]
+ toks[${#toks[@]}]=xxx/yyy
+ read -r tmp
+ COMPREPLY=("${COMPREPLY[@]}" "${toks[@]}")
yy 

HTH, let me know if you need more details

yann@dev:~/dev$ uname -a
Linux dev 2.6.27-9-server #1 SMP Thu Nov 20 22:53:41 UTC 2008 i686 GNU/Linux

yann@dev:~/dev$ cat /etc/issue.net 
Ubuntu 8.10

yann@dev:~/dev$ bash --version
GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

yann@dev:~/dev$ grep RELEASE: /etc/bash_completion
#   RELEASE: 20060301

yann@dev:~/dev$ mount -t vboxsf
devel on /home/yann/dev type vboxsf (uid=1000,gid=1000,rw)

Yann Kerherve

Attachments (1)

VBox.log (40.3 KB ) - added by Yann 16 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Frank Mehnert, 16 years ago

So far we were not able to reproduce this problem. I tested this with a Linux host + a Linux guest. Please could you attach a VBox.log file of such a VM session?

by Yann, 16 years ago

Attachment: VBox.log added

comment:2 by Yann, 16 years ago

I've attached the file per your request, please note that this is not consistent on my installation either, but is still fairly easy to reproduce (i.e it bugs be on a regular basis)

comment:3 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette