From 55c68536c2adcc75216e2e2f9c76f08d6fb4fb56 Mon Sep 17 00:00:00 2001 From: Dave Hayes Date: Wed, 13 Feb 2013 09:59:58 -0600 Subject: [PATCH 1/2] Fix removal of suffixes for values that have them --- beets/mediafile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beets/mediafile.py b/beets/mediafile.py index 71e429864..927cb389b 100644 --- a/beets/mediafile.py +++ b/beets/mediafile.py @@ -547,7 +547,7 @@ class MediaField(object): # Remove suffix. if style.suffix and isinstance(out, (str, unicode)): if out.endswith(style.suffix): - out = out[:len(style.suffix)] + out = out[:-len(style.suffix)] # MPEG-4 freeform frames are (should be?) encoded as UTF-8. if obj.type == 'mp4' and style.key.startswith('----:') and \ From 2f1dd9451b9b189a6518ec775363fe9283245200 Mon Sep 17 00:00:00 2001 From: Dave Hayes Date: Mon, 25 Apr 2016 13:04:05 -0500 Subject: [PATCH 2/2] Add notes for installing the ZSH completion script --- docs/reference/cli.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference/cli.rst b/docs/reference/cli.rst index fcef6d23f..faae67ee6 100644 --- a/docs/reference/cli.rst +++ b/docs/reference/cli.rst @@ -435,7 +435,10 @@ later on you will want to re-generate the script. zsh ``` -If you use zsh, take a look at the included `completion script`_. +If you use zsh, take a look at the included `completion script`_. The script +should be placed in a directory that is part of your ``fpath``, and `not` +sourced in your ``.zshrc``. Running ``echo $fpath`` will give you a list of +valid directories. Another approach is to use zsh's bash completion compatibility. This snippet defines some bash-specific functions to make this work without errors::