* PATCH: escaped spaces in bookmark paths
@ 2000-01-06 10:09 Alexandre Duret-Lutz
0 siblings, 0 replies; only message in thread
From: Alexandre Duret-Lutz @ 2000-01-06 10:09 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-01-06 9:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06 10:09 PATCH: escaped spaces in bookmark paths Alexandre Duret-Lutz
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).