gvfs r2307 - in trunk: . programs
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2307 - in trunk: . programs
- Date: Mon, 9 Mar 2009 16:18:52 +0000 (UTC)
Author: alexl
Date: Mon Mar 9 16:18:52 2009
New Revision: 2307
URL: http://svn.gnome.org/viewvc/gvfs?rev=2307&view=rev
Log:
2009-03-09 Alexander Larsson <alexl redhat com>
Bug 523732 â gvfs-bash-completion.sh should not modify COMP_WORDBREAKS
* programs/gvfs-bash-completion.sh:
Don't override COMP_WORDBREAKS, instead workaround the colon problem
Modified:
trunk/ChangeLog
trunk/programs/gvfs-bash-completion.sh
Modified: trunk/programs/gvfs-bash-completion.sh
==============================================================================
--- trunk/programs/gvfs-bash-completion.sh (original)
+++ trunk/programs/gvfs-bash-completion.sh Mon Mar 9 16:18:52 2009
@@ -24,14 +24,26 @@
####################################################################################################
-# don't misbehave on colons; See item E13 at http://tiswww.case.edu/php/chet/bash/FAQ
-COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
__gvfs_multiple_uris() {
local IFS=$'\n'
local cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=($(compgen -W '$(gvfs-ls --show-completions "$cur")' -- ""))
+
+ # don't misbehave on colons; See item E13 at http://tiswww.case.edu/php/chet/bash/FAQ
+ # We handle this locally be extracting any BLAH: prefix and removing it from the result.
+ # Not great, but better than globally changing COMP_WORDBREAKS
+
+ case "$cur" in
+ *:*)
+ case "$COMP_WORDBREAKS" in
+ *:*) colon_prefix=$(echo $cur | sed 's/:[^:]*$/:/' )
+ COMPREPLY=${COMPREPLY##${colon_prefix}}
+ ;;
+ esac
+ ;;
+ esac
}
####################################################################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]