Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

strange w3m completion



Hi,

I got strange w3m completion in zsh 4.3.6-4 (Debian).

For example,

----- ~/.zshrc -----
autoload -U compinit
compinit
--------------------

----- ~/.w3m/history -----
http://example.com/index.html
http://example.com/file.html
--------------------------

behavior 1) 
% w3m http://example.com

If I hit tab, then I get below result.

% w3m http://example.com/.html

and I hit tab in a row,
but I cannot get another results.

behavior 2)
% w3m http://example.com/

If I hit tab, then I get below result.

% w3m http://example.com/
http://example.com/file.html   http://example.com/index.html

Behavior 1) is not intentional and I am inconvenienced.
So, I modified zsh/functions/Completion/Unix/_w3m,
It makes behavior 1) gets the same result that behavior 2)'s.

--- /usr/share/zsh/functions/Completion/Unix/_w3m.bak	2008-07-05 00:39:20.000000000 +0900
+++ /usr/share/zsh/functions/Completion/Unix/_w3m	2008-07-05 02:20:08.000000000 +0900
@@ -83,9 +83,10 @@
     fi
     _alternative \
       'files:file:_files -g "*.x#html(-.)"' \
-      'urls:URL:_urls' \
       'bookmarks:bookmarks:compadd -a bookmarks' \
-      'history:history:compadd -a w3mhistory' && ret=0
+      'history:history:compadd -a w3mhistory' \
+      'urls:URL:_urls' \
+      && ret=0
   ;;
   option)
     local -a options

But I do not know whether it is correct approarch,
it is feared that it makes a bad side effect.
Please let me know better approach if exists.

Regards,
-- 
	dai



Messages sorted by: Reverse Date, Date, Thread, Author