From b9d5b9bab07553f0b7f648809be9545954a10acc Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 6 Oct 2014 22:25:39 +0200 Subject: [PATCH] Shell: Fix pacman completion --- .config/demlo/demlorc | 4 ++++ .shell.d/completion/_pcc | 17 ++--------------- .shell.d/completion_rc | 9 +++------ 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.config/demlo/demlorc b/.config/demlo/demlorc index 2f4a2b04..c4f6c84f 100644 --- a/.config/demlo/demlorc +++ b/.config/demlo/demlorc @@ -19,6 +19,10 @@ constants = constants .. ' der die das den dem des ein eine einen eines einer wo -- Music constants = constants .. " d'Acide JBX " +-- Extension support for external covers. This is a pattern-matching string. For +-- instance 'jpe?g' will match both 'jpg' and 'jpeg'. Case is ignored. +cover_extlist = { gif = true } + -- If true, extract covers from tags, copy covers in current folder, exclude those -- outside the size boundaries. covers = true diff --git a/.shell.d/completion/_pcc b/.shell.d/completion/_pcc index 458bd731..13b9954b 100644 --- a/.shell.d/completion/_pcc +++ b/.shell.d/completion/_pcc @@ -11,20 +11,7 @@ fi _pcc() { case $words[1] in - pacman-deps) - case $words[2] in - -*q*) - _pacman_action_query - return ;; - -) - return 1;; - *) - _pacman_action_sync - return ;; - esac - return ;; - - pacman-files) + pacfiles) _pacman_action_query return ;; @@ -32,7 +19,7 @@ _pcc() _pacman_action_query return ;; - pacman-size) + pacsize) case $words[2] in -*q*) _pacman_action_query diff --git a/.shell.d/completion_rc b/.shell.d/completion_rc index cd2ce16a..1288fc3d 100644 --- a/.shell.d/completion_rc +++ b/.shell.d/completion_rc @@ -1,7 +1,5 @@ ## -*- mode:sh -*- # -##============================================================================== -## Completion -##============================================================================== + if [ "zsh" = "$SHELL_CURRENT" ]; then compdef _gcc crun compdef _gcc formatc @@ -9,9 +7,8 @@ if [ "zsh" = "$SHELL_CURRENT" ]; then compdef _gs pdfextract compdef _gs pdfresize compdef _pacman pacman-color - compdef _pcc pacman-deps - compdef _pcc pacman-files - compdef _pcc pacman-size + compdef _pcc pacfiles + compdef _pcc pacsize compdef _pcc pql compdef _tex ltx compdef _path_commands typex