* [PATCH] Update feh completion for feh 1.6
@ 2010-06-01 15:51 Daniel Friesel
2010-06-06 22:37 ` Simon Ruderich
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Friesel @ 2010-06-01 15:51 UTC (permalink / raw)
To: zsh workers
[-- Attachment #1.1: Type: text/plain, Size: 100 bytes --]
Heya,
I updated the feh completion, it'd be nice if someone could commit that to the
repo.
--derf
[-- Attachment #1.2: 0001-Update-feh-completion-for-feh-1.6.patch --]
[-- Type: text/x-diff, Size: 6937 bytes --]
From e3d162aaf4c560a8967abb85e78b37b56f141756 Mon Sep 17 00:00:00 2001
From: Daniel Friesel <derf@derf.homelinux.org>
Date: Tue, 1 Jun 2010 17:45:49 +0200
Subject: [PATCH] Update feh completion for feh 1.6
---
Completion/Unix/Command/_feh | 85 ++++++++++++++++++++++++++++--------------
1 files changed, 57 insertions(+), 28 deletions(-)
diff --git a/Completion/Unix/Command/_feh b/Completion/Unix/Command/_feh
index e8d020f..ea86925 100644
--- a/Completion/Unix/Command/_feh
+++ b/Completion/Unix/Command/_feh
@@ -1,5 +1,5 @@
#compdef feh
-## completion for feh 1.3.4, based on feh(1)
+## completion for feh 1.6, based on feh(1)
typeset -a arguments
typeset -A argument_pairs argument_postfix
@@ -39,15 +39,14 @@ argument_pairs=(
'thumbnails' 't'
'menu-font' 'M+'
'no-menus' 'N'
- 'next-button' '1+'
+ 'reload-button' '0'
+ 'pan-button' '1+'
'zoom-button' '2+'
- 'pan-button' '3+'
- 'menu-button' '4+'
- 'no-menu-ctrl-mask' '5'
- 'rotate-button' '6+'
- 'no-rotate-ctrl-mask' '7'
- 'blur-button' '8+'
- 'no-blur-ctrl-mask' '9'
+ 'menu-button' '3+'
+ 'prev-button' '4+'
+ 'next-button' '5+'
+ 'rotate-button' '8+'
+ 'blur-button' '9+'
'ignore-aspect' 'X'
'stretch' 's'
'thumb-width' 'y+'
@@ -57,6 +56,18 @@ argument_pairs=(
'bg' 'b+'
'alpha' 'a+'
'font' 'e+'
+ 'scale-down' '.'
+ 'output-dir' 'j+'
+ 'wget-timestamp' 'G'
+ 'fontpath' 'C+'
+ 'image-bg' 'B+'
+ 'output' 'o'
+ 'output-only' 'O'
+ 'rcfile' '_'
+ 'thumb-title' '~'
+ 'title' '^'
+ 'start-at' '|'
+ 'title-font' '@'
)
argument_postfix=(
@@ -92,15 +103,14 @@ argument_postfix=(
'thumbnails' '[Enable interactive index mode]'
'menu-font' '[Set font in menus]:font: '
'no-menus' "[Don't load or show any menus]"
- 'next-button' '[Button for next image]:button:_feh_button'
- 'zoom-button' '[Button to zoom image]:button:_fes_button'
- 'pan-button' '[Ctrl+Button to pan image]:button:_feh_button'
+ 'reload-button' '[Button to reload image]:button:_feh_button'
+ 'pan-button' '[Button to pan image]:button:_feh_button'
+ 'zoom-button' '[Button to zoom image]:button:_feh_button'
'menu-button' '[Button to activate menu]:button:_feh_button'
- 'no-menu-ctrl-mask' '[Show Menu without pressing ctrl]'
+ 'prev-button' '[Button to go to previous image]:button:_feh_button'
+ 'next-button' '[Button to go to next image]:button:_feh_button'
'rotate-button' '[Ctrl+Button to rotate image]:button:_feh_button'
- 'no-rotate-ctrl-mask' '[Rotate without pressing ctrl]'
'blur-button' '[Ctrl+Button tu blur image]:button:_feh_button'
- 'no-blur-ctrl-mask' '[Blur without pressing ctrl]'
'ignore-aspect' "[montage mode: Don't preserve aspect ratio]"
'stretch' '[montage mode: Enlarge images to fit thumbnail size]'
'thumb-width' '[montage mode: Thumbnail width]:pixels: '
@@ -111,33 +121,52 @@ argument_postfix=(
'alpha' '[montage mode: Thumbnail transparency level]:integer: '
'font' '[index mode: Thumbnail info font]:font: '
'slideshow-delay' '[slide change delay]:seconds'
+ 'scale-down' '[Scale down images which are too big]'
+ 'output-dir' '[Save files to DIR (with -k)]:directory:_files -/'
+ 'wget-timestamp' '[Add no timestamp ("?123") to URLs]'
+ 'fontpath' '[Add paths to font path]:font path:_files -/'
+ 'image-bg' '[Set transparent image background]:background:(white black default)'
+ 'output' '[montage mode: Output file]:file:_files'
+ 'output-only' "[montage mode: Output file, don't display montage]:file:_files"
+ 'rcfile' '[Specify config file]:file:_files'
+ 'thumb-title' '[Window title in thumbnail mode]:format string'
+ 'title' '[Window title in slideshow mode]:format string'
+ 'start-at' '[Start slideshow at]:file:_files'
+ 'title-font' '[Title font for index mode]:font'
)
arguments=(
- '--rcfile[Specify config file]:file:_files'
'--zoom[Zoom images]:percent: '
'--caption-path[Where to look for image captions]:relative directory: '
--action{1..9}':shell: '
'--bg-tile[Set tiled desktop background]:file:_files'
'--bg-center[Set centered desktop background]:file:_files'
'--bg-scale[Set scaled desktop background]:file:_files'
- '--bg-seamless[Set scaled desktop background, preserving aspect]:file:_files'
+ '--bg-seamless[Set desktop background with seamless borders]:file:_files'
+ '--bg-fill[Set scaled desktop background, preserving aspect ratio]:file:_files'
'--menu-style[Style descriptor for menu text]:file:_files'
- '--menu-bg[Background image in menus]: :_feh_background'
'--menu-border[Set menu background border]:integer: '
- '--no-pan-ctrl-mask[Pan without pressing ctrl]'
- '--xinerama[Toggle xinerama support]'
+ '--menu-ctrl-mask[Use Ctrl+Button to display menu]'
+ '--no-rotate-ctrl-mask[Don'\''t require Ctrl for the rotate button]'
+ '--no-blur-ctrl-mask[Don'\''t require Ctrl for the blur button]'
+ '--no-xinerama[Disable xinerama support]'
'--screen-clip[Toggle window clipping]'
'--hide-pointer[Hide mouse pointer in fullscreen mode]'
- '-o[montage mode: Output file]:file:_files'
- "-O[montage mode: Output file, don't display montage]:file:_files"
'*--fontpath[index mode: directory to search for fonts]:directory:_path_files -/'
- '--title-font[index mode: title font]:font: '
+ '--index-name[Show image name in index/thumbnail mode]:bool:(0 1)'
+ '--index-size[Show image size in index/thumbnail mode]:bool:(0 1)'
+ '--index-dim[Show image dimensions in index/thumbnail mode]:bool:(0 1)'
+ '--no-jump-on-resort[Stay at current image after resorting the filelist]'
+ '--cycle-once[Quit after one loop through the slideshow]'
+ '--draw-actions[Draw defined actions]'
+ '--cache-thumbnails[Enable thumbnail caching]'
+ '--menu-bg[Background image in menus]: :_feh_background'
+ '--thumb-redraw[Set thumbnail image redraw frequency]:digit'
'*:file:_files'
)
for arg in ${(k)argument_pairs}; {
- arguments+='(--'$arg')-'${argument_pairs[$arg]}${argument_postfix[$arg]}
+ arguments+='(--'${arg}')-'${argument_pairs[$arg]}${argument_postfix[$arg]}
arguments+='(-'${argument_pairs[$arg]}[1]')--'${arg}${argument_postfix[$arg]}
}
@@ -147,9 +176,9 @@ function _feh_theme {
typeset theme IFS=$'\n'
for theme in $(grep "\w" ~/.fehrc | grep -v "^#"); do
tmp=(${(s: :)theme})
- theme=$tmp[1]
+ theme=${tmp[1]}
shift tmp
- themes+=$theme:${(j: :)tmp}
+ themes+=${theme}:${(j: :)tmp}
done
_describe 'theme' themes
fi
@@ -158,7 +187,7 @@ function _feh_theme {
function _feh_button {
typeset expl
_wanted button expl button \
- compadd 1 2 3
+ compadd {0..5}
}
function _feh_background {
@@ -167,4 +196,4 @@ function _feh_background {
'mode:mode:(trans)'
}
-_arguments -s $arguments
+_arguments -s ${arguments}
--
1.7.1
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Update feh completion for feh 1.6
2010-06-01 15:51 [PATCH] Update feh completion for feh 1.6 Daniel Friesel
@ 2010-06-06 22:37 ` Simon Ruderich
2010-06-07 5:03 ` Doug Kearns
0 siblings, 1 reply; 3+ messages in thread
From: Simon Ruderich @ 2010-06-06 22:37 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
On Tue, Jun 01, 2010 at 05:51:55PM +0200, Daniel Friesel wrote:
> Heya,
>
> I updated the feh completion, it'd be nice if someone could
> commit that to the repo.
>
> --derf
> [snip]
>
> for arg in ${(k)argument_pairs}; {
> - arguments+='(--'$arg')-'${argument_pairs[$arg]}${argument_postfix[$arg]}
> + arguments+='(--'${arg}')-'${argument_pairs[$arg]}${argument_postfix[$arg]}
> arguments+='(-'${argument_pairs[$arg]}[1]')--'${arg}${argument_postfix[$arg]}
> }
>
> [snip]
Looks like this wasn't committed correctly. Here is a patch which
should fix it.
--- a/Completion/Unix/Command/_feh
+++ b/Completion/Unix/Command/_feh
@@ -164,7 +164,8 @@ arguments=(
)
for arg in ${(k)argument_pairs}; {
- arguments+='(--'${arg}')-'${argument_pairs[$arg]}${argument_postfix[$arg arguments+='(-'${argument_pairs[$arg]}[1]')--'${arg}${argument_postfix[$arg]}
+ arguments+='(--'${arg}')-'${argument_pairs[$arg]}${argument_postfix[$arg]}
+ arguments+='(-'${argument_pairs[$arg]}[1]')--'${arg}${argument_postfix[$arg]}
}
function _feh_theme {
Thanks,
Simon
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Update feh completion for feh 1.6
2010-06-06 22:37 ` Simon Ruderich
@ 2010-06-07 5:03 ` Doug Kearns
0 siblings, 0 replies; 3+ messages in thread
From: Doug Kearns @ 2010-06-07 5:03 UTC (permalink / raw)
To: zsh-workers
On Mon, Jun 7, 2010 at 8:37 AM, Simon Ruderich <simon@ruderich.org> wrote:
<snip>
> Looks like this wasn't committed correctly. Here is a patch which
> should fix it.
Committed, thanks.
Doug
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-07 5:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 15:51 [PATCH] Update feh completion for feh 1.6 Daniel Friesel
2010-06-06 22:37 ` Simon Ruderich
2010-06-07 5:03 ` Doug Kearns
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).