Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
# Copyright (C) 2006-2007 Red Hat, Inc.
2
#
3
# This library is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU Lesser General Public License as
5
# published by the Free Software Foundation; either version 2 of the
6
# License, or (at your option) any later version.
7
#
8
# This library is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
# Lesser General Public License for more details.
12
#
13
# You should have received a copy of the GNU Lesser General Public
14
# License along with this library; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
16
# USA.
17
#
18
# Author: David Zeuthen <davidz@redhat.com>
19
 
20
# Check for bash
21
[ -z "$BASH_VERSION" ] && return
22
 
23
####################################################################################################
24
 
25
 
26
__gvfs_multiple_uris() {
27
    local IFS=$'\n'
28
    local cur="${COMP_WORDS[COMP_CWORD]}"
29
 
30
    COMPREPLY=($(compgen -W '$(gvfs-ls --show-completions "$cur")' -- ""))
31
 
32
    # don't misbehave on colons; See item E13 at http://tiswww.case.edu/php/chet/bash/FAQ
33
    # We handle this locally be extracting any BLAH: prefix and removing it from the result.
34
    # Not great, but better than globally changing COMP_WORDBREAKS
35
 
36
    case "$cur" in
37
	*:*)
38
	    case "$COMP_WORDBREAKS" in
39
		*:*) colon_prefix=$(echo $cur | sed 's/:[^:]*$/:/' )
40
		    COMPREPLY=${COMPREPLY##${colon_prefix}}
41
		    ;;
42
	    esac
43
	    ;;
44
    esac
45
}
46
 
47
####################################################################################################
48
 
49
complete -o nospace -F __gvfs_multiple_uris gvfs-ls
50
complete -o nospace -F __gvfs_multiple_uris gvfs-info
51
complete -o nospace -F __gvfs_multiple_uris gvfs-cat
52
complete -o nospace -F __gvfs_multiple_uris gvfs-less
53
complete -o nospace -F __gvfs_multiple_uris gvfs-copy
54
complete -o nospace -F __gvfs_multiple_uris gvfs-mkdir
55
complete -o nospace -F __gvfs_multiple_uris gvfs-monitor-dir
56
complete -o nospace -F __gvfs_multiple_uris gvfs-monitor-file
57
complete -o nospace -F __gvfs_multiple_uris gvfs-move
58
complete -o nospace -F __gvfs_multiple_uris gvfs-open
59
complete -o nospace -F __gvfs_multiple_uris gvfs-rm
60
complete -o nospace -F __gvfs_multiple_uris gvfs-save
61
complete -o nospace -F __gvfs_multiple_uris gvfs-trash
62
complete -o nospace -F __gvfs_multiple_uris gvfs-tree