From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10913 invoked from network); 6 Jan 2000 09:51:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jan 2000 09:51:24 -0000 Received: (qmail 19761 invoked by alias); 6 Jan 2000 09:51:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9240 Received: (qmail 19750 invoked from network); 6 Jan 2000 09:51:17 -0000 To: zsh-workers@sunsite.auc.dk Subject: PATCH: escaped spaces in bookmark paths From: Alexandre Duret-Lutz Date: 06 Jan 2000 11:09:08 +0100 In-Reply-To: "Andrej Borsenkow"'s message of "Thu, 6 Jan 2000 10:32:54 +0300" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii It look like _urls has problems expanding bookmarks containing spaces : % cat .zsh/urls/bookmark/f\ o\ o/bar http://www.foobar.org/ % netscape bookmark:f % netscape bookmark:f\ o\ o/ % netscape bookmark:f\ o\ o/bar # <- don't substitute in # % netscape http://www.foobar.org Is `(Q)' the right way to cope with this? Index: Completion/User/_urls --- Completion/User/_urls Fri, 31 Dec 1999 13:32:44 +0100 Alexandre +++ Completion/User/_urls Thu, 06 Jan 2000 11:04:52 +0100 Alexandre @@ -85,11 +85,11 @@ fi ;; bookmark) - if [[ -f "$urls_path/$scheme/$PREFIX$SUFFIX" && - -s "$urls_path/$scheme/$PREFIX$SUFFIX" ]]; then + if [[ -f "$urls_path/$scheme/${(Q)PREFIX}${(Q)SUFFIX}" && + -s "$urls_path/$scheme/${(Q)PREFIX}${(Q)SUFFIX}" ]]; then _wanted -C bookmark bookmarks expl bookmarks && compadd "$expl[@]" "$@" -QU - \ - "$ipre$(<"$urls_path/$scheme/$PREFIX$SUFFIX")" && ret=0 + "$ipre$(<"$urls_path/$scheme/${(Q)PREFIX}${(Q)SUFFIX}")" && ret=0 else if _wanted -C bookmark files expl 'bookmark'; then _path_files -W "$urls_path/$scheme" "$expl[@]" -S '' -g '*(^/)' && -- Alexandre Duret-Lutz