From: Alexandre Duret-Lutz <duret_g@epita.fr>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: escaped spaces in bookmark paths
Date: 06 Jan 2000 11:09:08 +0100 [thread overview]
Message-ID: <mvbzoujldff.fsf@phobos.lrde.epita.fr> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of "Thu, 6 Jan 2000 10:32:54 +0300"
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<TAB>
% netscape bookmark:f\ o\ o/<TAB>
% netscape bookmark:f\ o\ o/bar<TAB> # <- 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
reply other threads:[~2000-01-06 9:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvbzoujldff.fsf@phobos.lrde.epita.fr \
--to=duret_g@epita.fr \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).