Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 06BDE183DF for ; Wed, 12 Aug 2015 09:35:48 +0000 (UTC) Received: (qmail 85084 invoked by uid 500); 12 Aug 2015 09:35:47 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 85035 invoked by uid 500); 12 Aug 2015 09:35:47 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Delivered-To: moderator for dev@subversion.apache.org Received: (qmail 55637 invoked by uid 99); 12 Aug 2015 09:24:19 -0000 X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1] autolearn=disabled From: Christian Ferbar To: dev@subversion.apache.org Subject: bash_completion - subversion add: svn ls/merge ^/ Date: Wed, 12 Aug 2015 11:24:03 +0200 Message-ID: <3421020.HomHkagcjs@chris-ws> Organization: qnipp User-Agent: KMail/4.14.9 (Linux/3.16.7-21-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1772530.z0QflgY9oF" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart1772530.z0QflgY9oF Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi, with this patch svn ls ^/ and svn merge ^/ will list the remote directories. to get "svn ls ^/" to autocomplete the path export SVN_BASH_COMPL_EXT=urls has to be set, I don't know why this check is only in ls ... Regards, Chris --nextPart1772530.z0QflgY9oF Content-Disposition: attachment; filename="bash_completion_subversion.patch" Content-Transfer-Encoding: quoted-printable Content-Type: text/x-patch; charset="utf-8"; name="bash_completion_subversion.patch" --- /etc/bash_completion.d/subversion=092015-08-11 22:17:11.808000000 += 0200 +++ subversion=092015-08-12 11:13:42.135616669 +0200 @@ -420,6 +420,16 @@ =20 =09=09=09COMPREPLY=3D( $(compgen -W "$choices" -- $suffix ) ) =09=09=09return + elif [[ $cmd =3D=3D @(ls|list) && $cur =3D=3D ^/* ]] ; then + # autocomplete f=C3=BCr svn ls ^/bla + if [[ $cur =3D~ ((.*/)([^/]*)) ]] ; then + url=3D"${BASH_REMATCH[2]}" +=09 path=3D"${BASH_REMATCH[3]}" + remote_files=3D"$(svn ls "$url")" + COMPREPLY=3D( $(compgen -P "$url" -W "$remote_files" -- "$= path" ) ) + compopt -o nospace + return 0 + fi =09=09else =09=09=09# show schemas =09=09=09COMPREPLY=3D( $(compgen -W "$urlSchemas" -- $cur) ) @@ -451,6 +461,16 @@ =09 # force --reintegrate only if the current word is empty =09 COMPREPLY=3D( $(compgen -W '--reintegrate' -- $cur ) ) =09 return 0 + elif [[ $URL =3D=3D ^/* ]] ; then + # autocomplete f=C3=BCr svn merge ^/bla + if [[ $cur =3D~ ((.*/)([^/]*)) ]] ; then + url=3D"${BASH_REMATCH[2]}" +=09=09 path=3D"${BASH_REMATCH[3]}" +=09=09 remote_files=3D"$(svn ls "$url")" +=09 COMPREPLY=3D( $(compgen -P "$url" -W "$remote_files" -- "$pat= h" ) ) +=09=09 compopt -o nospace + return 0 + fi =09 fi =09fi =20 --nextPart1772530.z0QflgY9oF--