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

Broken completion with UTF-8 description

Writing completion for kcmshell (attached); it outputs list of KDE 
configuration modules together with descriptions and I have not found any way 
(confirmed by KDE developers) to force descriptions in English. So far I get 
the following:

{pts/1}% kcmshell --list
Доступны следующие модули:
kwalletconfig    - Настройка бумажника KDE
privacy          - Модуль kcontrol, очищающий нежелательные следы, оставленные 
пользователем в операционной системе

results in following:

printers                       -- Настройки системы печа�[0m
privacy                        -- Модуль kcontrol, очищающ�[0m
profilechooser                 -- Mandriva KDE profilechooser
proxy                          -- Настройка серверов прок�[0m

(I can add screenshot)

Is it supposed to work at all? Using current CVS.
#compdef kcmshell

# kcmshell is a command line interface to KDE configuration modules

_kcmshell_list_modules() {
  local -a x

  x=( ${${(f)"$(kcmshell --list 2> /dev/null)"}[2,-1]/[[:space:]]##-[[:space:]]/:})
  (( $#x )) || return 1

  _describe -t modules "KDE configuration module" x

_kcmshell() {
  local expl
  local -a context state line
  typeset -A opt_args

  _arguments \
    '--help[show help message]' \
    '--help-qt[show Qt specific options]' \
    '--help-kde[show KDE specific options]' \
    '--help-all[show all options]' \
    '--author[show author information]' \
    '-v[show version information]' \
    '--version[show version information]' \
    '--license[show license information]' \
    '(*)--list[show all available modules]' \
    '--display=:X display:_x_display' \
    '--session=:session id for restoring application: ' \
    '--cmap[use private colormap (8-bit display)]' \
    '--ncols=:limit on number of colors (8-bit display): ' \
    '--nograb[never grab mouse or keyboard]' \
    '--dograb[override nograb in debugger]' \
    '--sync[switch to synchronous mode when debugging]' \
    '--fn=:font name:_x_font' \
    '--font=:font name:_x_font' \
    '--bg=:background color:_x_color' \
    '--background=:background color:_x_color' \
    '--fg=:foreground color:_x_color' \
    '--foreround=:foreground color:_x_color' \
    '--btn=:button color:_x_color' \
    '--button=:button color:_x_color' \
    '--name=:application name: ' \
    '--title=:application title (caption): ' \
    '--visual=:specify visual:_x_visual' \
    '--inputstyle:X input method:(onthespot overthespot offthespot root)' \
    '--im:X Input Method server: ' \
    '--noxim[disable X Input Method]' \
    '--reverse[reverse widget layout]' \
    '--caption=:name in titlebar: ' \
    '--icon=:application icon: ' \
    '--miniicon=:icon in titlebar: ' \
    '--config=:configuration  file:_files' \
    '--dcopserver=:DCOP server: ' \
    '--nocrashhandler[disable crash handler, allow core dumps]' \
    '--waitforwm[wait for a WM_NET compatible window manager]' \
    '--style=:GUI style for application: ' \
    '--geometry=:client window geometry:_x_geometry' \
    '(-)1:configuration module:_kcmshell_list_modules' \
    &&  return 0

_kcmshell "$@"

Attachment: pgpYSpdTlkrGg.pgp
Description: PGP signature

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