Package: zsh-common
Version: 5.0.7-5
Severity: minor
Tags: upstream patch

Dear Maintainer,

Zsh files are stored in /etc/zsh, they should be stored in /etc/zsh.d instead. 
This is more consitant with other directories. I included a patch which makes 
the new folder, moves, and creates a symlink. There is proabably a better 
solution, but I just created a quick hack.

-- Package-specific info:

Packages which provide vendor completions:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         
Description
+++-===============================-====================-====================-====================================================================
ii  reprepro                        4.16.0-1             armhf                
Debian package repository producer
ri  systemd                         215-17+deb8u4        armhf                
system and service manager

dpkg-query: no path found matching pattern /usr/share/zsh/vendor-functions


-- System Information:
Distributor ID: Debian
Description:    Debian GNU/Linux Rolling
Release:        Jessie
Codename:       Jessie
Architecture: armv7l

Kernel: Linux 4.4.7-v7+ (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages zsh-common depends on:
ii  dpkg  1.17.26

Versions of packages zsh-common recommends:
ii  zsh  5.0.7-5

Versions of packages zsh-common suggests:
pn  zsh-doc  <none>

-- no debconf information
diff -Naur zsh-common-orig/control/conffiles zsh-common/control/conffiles
--- zsh-common-orig/control/conffiles	2014-11-25 16:47:14.000000000 -0600
+++ zsh-common/control/conffiles	2016-04-30 10:13:07.525182894 -0500
@@ -1,6 +1,6 @@
-/etc/zsh/newuser.zshrc.recommended
-/etc/zsh/zlogin
-/etc/zsh/zlogout
-/etc/zsh/zprofile
-/etc/zsh/zshenv
-/etc/zsh/zshrc
+/etc/zsh.d/newuser.zshrc.recommended
+/etc/zsh.d/zlogin
+/etc/zsh.d/zlogout
+/etc/zsh.d/zprofile
+/etc/zsh.d/zshenv
+/etc/zsh.d/zshrc
diff -Naur zsh-common-orig/control/postinst zsh-common/control/postinst
--- zsh-common-orig/control/postinst	2014-11-25 16:47:14.000000000 -0600
+++ zsh-common/control/postinst	2016-04-30 10:23:11.932056969 -0500
@@ -13,6 +13,7 @@
 # Automatically added by dh_installdeb
 dpkg-maintscript-helper symlink_to_dir /usr/share/doc/zsh zsh-common 5.0.7-3 -- "$@"
 # End automatically added section
-
+mv /etc/zsh/* /etc/zsh.d/ 2>/dev/null
+ln -s /etc/zsh.d /etc/zsh
 
 exit 0
diff -Naur zsh-common-orig/data/etc/zsh/newuser.zshrc.recommended zsh-common/data/etc/zsh/newuser.zshrc.recommended
--- zsh-common-orig/data/etc/zsh/newuser.zshrc.recommended	2014-10-07 18:29:08.000000000 -0500
+++ zsh-common/data/etc/zsh/newuser.zshrc.recommended	1969-12-31 18:00:00.000000000 -0600
@@ -1,37 +0,0 @@
-# Set up the prompt
-
-autoload -Uz promptinit
-promptinit
-prompt adam1
-
-setopt histignorealldups sharehistory
-
-# Use emacs keybindings even if our EDITOR is set to vi
-bindkey -e
-
-# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
-HISTSIZE=1000
-SAVEHIST=1000
-HISTFILE=~/.zsh_history
-
-# Use modern completion system
-autoload -Uz compinit
-compinit
-
-zstyle ':completion:*' auto-description 'specify: %d'
-zstyle ':completion:*' completer _expand _complete _correct _approximate
-zstyle ':completion:*' format 'Completing %d'
-zstyle ':completion:*' group-name ''
-zstyle ':completion:*' menu select=2
-eval "$(dircolors -b)"
-zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
-zstyle ':completion:*' list-colors ''
-zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
-zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
-zstyle ':completion:*' menu select=long
-zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
-zstyle ':completion:*' use-compctl false
-zstyle ':completion:*' verbose true
-
-zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
-zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
diff -Naur zsh-common-orig/data/etc/zsh/zlogin zsh-common/data/etc/zsh/zlogin
--- zsh-common-orig/data/etc/zsh/zlogin	2014-10-07 18:29:08.000000000 -0500
+++ zsh-common/data/etc/zsh/zlogin	1969-12-31 18:00:00.000000000 -0600
@@ -1,9 +0,0 @@
-# /etc/zsh/zlogin: system-wide .zlogin file for zsh(1).
-#
-# This file is sourced only for login shells. It
-# should contain commands that should be executed only
-# in login shells. It should be used to set the terminal
-# type and run a series of external commands (fortune,
-# msgs, from, etc.)
-#
-# Global Order: zshenv, zprofile, zshrc, zlogin
diff -Naur zsh-common-orig/data/etc/zsh/zlogout zsh-common/data/etc/zsh/zlogout
--- zsh-common-orig/data/etc/zsh/zlogout	2014-10-07 18:29:08.000000000 -0500
+++ zsh-common/data/etc/zsh/zlogout	1969-12-31 18:00:00.000000000 -0600
@@ -1 +0,0 @@
-# /etc/zsh/zlogout: system-wide .zlogout file for zsh(1).
diff -Naur zsh-common-orig/data/etc/zsh/zprofile zsh-common/data/etc/zsh/zprofile
--- zsh-common-orig/data/etc/zsh/zprofile	2014-10-07 18:29:08.000000000 -0500
+++ zsh-common/data/etc/zsh/zprofile	1969-12-31 18:00:00.000000000 -0600
@@ -1,7 +0,0 @@
-# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1).
-#
-# This file is sourced only for login shells (i.e. shells
-# invoked with "-" as the first character of argv[0], and
-# shells invoked with the -l flag.)
-#
-# Global Order: zshenv, zprofile, zshrc, zlogin
diff -Naur zsh-common-orig/data/etc/zsh/zshenv zsh-common/data/etc/zsh/zshenv
--- zsh-common-orig/data/etc/zsh/zshenv	2014-10-07 18:29:08.000000000 -0500
+++ zsh-common/data/etc/zsh/zshenv	1969-12-31 18:00:00.000000000 -0600
@@ -1,18 +0,0 @@
-# /etc/zsh/zshenv: system-wide .zshenv file for zsh(1).
-#
-# This file is sourced on all invocations of the shell.
-# If the -f flag is present or if the NO_RCS option is
-# set within this file, all other initialization files
-# are skipped.
-#
-# This file should contain commands to set the command
-# search path, plus other important environment variables.
-# This file should not contain commands that produce
-# output or assume the shell is attached to a tty.
-#
-# Global Order: zshenv, zprofile, zshrc, zlogin
-
-if [[ -z "$PATH" || "$PATH" == "/bin:/usr/bin" ]]
-then
-	export PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
-fi
diff -Naur zsh-common-orig/data/etc/zsh/zshrc zsh-common/data/etc/zsh/zshrc
--- zsh-common-orig/data/etc/zsh/zshrc	2014-10-07 18:29:08.000000000 -0500
+++ zsh-common/data/etc/zsh/zshrc	1969-12-31 18:00:00.000000000 -0600
@@ -1,104 +0,0 @@
-# /etc/zsh/zshrc: system-wide .zshrc file for zsh(1).
-#
-# This file is sourced only for interactive shells. It
-# should contain commands to set up aliases, functions,
-# options, key bindings, etc.
-#
-# Global Order: zshenv, zprofile, zshrc, zlogin
-
-READNULLCMD=${PAGER:-/usr/bin/pager}
-
-# An array to note missing features to ease diagnosis in case of problems.
-typeset -ga debian_missing_features
-
-if [[ -z "$DEBIAN_PREVENT_KEYBOARD_CHANGES" ]] &&
-   [[ "$TERM" != 'emacs' ]]
-then
-
-    typeset -A key
-    key=(
-        BackSpace  "${terminfo[kbs]}"
-        Home       "${terminfo[khome]}"
-        End        "${terminfo[kend]}"
-        Insert     "${terminfo[kich1]}"
-        Delete     "${terminfo[kdch1]}"
-        Up         "${terminfo[kcuu1]}"
-        Down       "${terminfo[kcud1]}"
-        Left       "${terminfo[kcub1]}"
-        Right      "${terminfo[kcuf1]}"
-        PageUp     "${terminfo[kpp]}"
-        PageDown   "${terminfo[knp]}"
-    )
-
-    function bind2maps () {
-        local i sequence widget
-        local -a maps
-
-        while [[ "$1" != "--" ]]; do
-            maps+=( "$1" )
-            shift
-        done
-        shift
-
-        sequence="${key[$1]}"
-        widget="$2"
-
-        [[ -z "$sequence" ]] && return 1
-
-        for i in "${maps[@]}"; do
-            bindkey -M "$i" "$sequence" "$widget"
-        done
-    }
-
-    bind2maps emacs             -- BackSpace   backward-delete-char
-    bind2maps       viins       -- BackSpace   vi-backward-delete-char
-    bind2maps             vicmd -- BackSpace   vi-backward-char
-    bind2maps emacs             -- Home        beginning-of-line
-    bind2maps       viins vicmd -- Home        vi-beginning-of-line
-    bind2maps emacs             -- End         end-of-line
-    bind2maps       viins vicmd -- End         vi-end-of-line
-    bind2maps emacs viins       -- Insert      overwrite-mode
-    bind2maps             vicmd -- Insert      vi-insert
-    bind2maps emacs             -- Delete      delete-char
-    bind2maps       viins vicmd -- Delete      vi-delete-char
-    bind2maps emacs viins vicmd -- Up          up-line-or-history
-    bind2maps emacs viins vicmd -- Down        down-line-or-history
-    bind2maps emacs             -- Left        backward-char
-    bind2maps       viins vicmd -- Left        vi-backward-char
-    bind2maps emacs             -- Right       forward-char
-    bind2maps       viins vicmd -- Right       vi-forward-char
-
-    # Make sure the terminal is in application mode, when zle is
-    # active. Only then are the values from $terminfo valid.
-    if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
-        function zle-line-init () {
-            emulate -L zsh
-            printf '%s' ${terminfo[smkx]}
-        }
-        function zle-line-finish () {
-            emulate -L zsh
-            printf '%s' ${terminfo[rmkx]}
-        }
-        zle -N zle-line-init
-        zle -N zle-line-finish
-    else
-        for i in {s,r}mkx; do
-            (( ${+terminfo[$i]} )) || debian_missing_features+=($i)
-        done
-        unset i
-    fi
-
-    unfunction bind2maps
-
-fi # [[ -z "$DEBIAN_PREVENT_KEYBOARD_CHANGES" ]] && [[ "$TERM" != 'emacs' ]]
-
-zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
-                                           /usr/local/bin  \
-                                           /usr/sbin       \
-                                           /usr/bin        \
-                                           /sbin           \
-                                           /bin            \
-                                           /usr/X11R6/bin
-
-(( ${+aliases[run-help]} )) && unalias run-help
-autoload -Uz run-help
diff -Naur zsh-common-orig/data/etc/zsh.d/newuser.zshrc.recommended zsh-common/data/etc/zsh.d/newuser.zshrc.recommended
--- zsh-common-orig/data/etc/zsh.d/newuser.zshrc.recommended	1969-12-31 18:00:00.000000000 -0600
+++ zsh-common/data/etc/zsh.d/newuser.zshrc.recommended	2014-10-07 18:29:08.000000000 -0500
@@ -0,0 +1,37 @@
+# Set up the prompt
+
+autoload -Uz promptinit
+promptinit
+prompt adam1
+
+setopt histignorealldups sharehistory
+
+# Use emacs keybindings even if our EDITOR is set to vi
+bindkey -e
+
+# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
+HISTSIZE=1000
+SAVEHIST=1000
+HISTFILE=~/.zsh_history
+
+# Use modern completion system
+autoload -Uz compinit
+compinit
+
+zstyle ':completion:*' auto-description 'specify: %d'
+zstyle ':completion:*' completer _expand _complete _correct _approximate
+zstyle ':completion:*' format 'Completing %d'
+zstyle ':completion:*' group-name ''
+zstyle ':completion:*' menu select=2
+eval "$(dircolors -b)"
+zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
+zstyle ':completion:*' list-colors ''
+zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
+zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
+zstyle ':completion:*' menu select=long
+zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
+zstyle ':completion:*' use-compctl false
+zstyle ':completion:*' verbose true
+
+zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
+zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
diff -Naur zsh-common-orig/data/etc/zsh.d/zlogin zsh-common/data/etc/zsh.d/zlogin
--- zsh-common-orig/data/etc/zsh.d/zlogin	1969-12-31 18:00:00.000000000 -0600
+++ zsh-common/data/etc/zsh.d/zlogin	2014-10-07 18:29:08.000000000 -0500
@@ -0,0 +1,9 @@
+# /etc/zsh/zlogin: system-wide .zlogin file for zsh(1).
+#
+# This file is sourced only for login shells. It
+# should contain commands that should be executed only
+# in login shells. It should be used to set the terminal
+# type and run a series of external commands (fortune,
+# msgs, from, etc.)
+#
+# Global Order: zshenv, zprofile, zshrc, zlogin
diff -Naur zsh-common-orig/data/etc/zsh.d/zlogout zsh-common/data/etc/zsh.d/zlogout
--- zsh-common-orig/data/etc/zsh.d/zlogout	1969-12-31 18:00:00.000000000 -0600
+++ zsh-common/data/etc/zsh.d/zlogout	2014-10-07 18:29:08.000000000 -0500
@@ -0,0 +1 @@
+# /etc/zsh/zlogout: system-wide .zlogout file for zsh(1).
diff -Naur zsh-common-orig/data/etc/zsh.d/zprofile zsh-common/data/etc/zsh.d/zprofile
--- zsh-common-orig/data/etc/zsh.d/zprofile	1969-12-31 18:00:00.000000000 -0600
+++ zsh-common/data/etc/zsh.d/zprofile	2014-10-07 18:29:08.000000000 -0500
@@ -0,0 +1,7 @@
+# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1).
+#
+# This file is sourced only for login shells (i.e. shells
+# invoked with "-" as the first character of argv[0], and
+# shells invoked with the -l flag.)
+#
+# Global Order: zshenv, zprofile, zshrc, zlogin
diff -Naur zsh-common-orig/data/etc/zsh.d/zshenv zsh-common/data/etc/zsh.d/zshenv
--- zsh-common-orig/data/etc/zsh.d/zshenv	1969-12-31 18:00:00.000000000 -0600
+++ zsh-common/data/etc/zsh.d/zshenv	2014-10-07 18:29:08.000000000 -0500
@@ -0,0 +1,18 @@
+# /etc/zsh/zshenv: system-wide .zshenv file for zsh(1).
+#
+# This file is sourced on all invocations of the shell.
+# If the -f flag is present or if the NO_RCS option is
+# set within this file, all other initialization files
+# are skipped.
+#
+# This file should contain commands to set the command
+# search path, plus other important environment variables.
+# This file should not contain commands that produce
+# output or assume the shell is attached to a tty.
+#
+# Global Order: zshenv, zprofile, zshrc, zlogin
+
+if [[ -z "$PATH" || "$PATH" == "/bin:/usr/bin" ]]
+then
+	export PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
+fi
diff -Naur zsh-common-orig/data/etc/zsh.d/zshrc zsh-common/data/etc/zsh.d/zshrc
--- zsh-common-orig/data/etc/zsh.d/zshrc	1969-12-31 18:00:00.000000000 -0600
+++ zsh-common/data/etc/zsh.d/zshrc	2014-10-07 18:29:08.000000000 -0500
@@ -0,0 +1,104 @@
+# /etc/zsh/zshrc: system-wide .zshrc file for zsh(1).
+#
+# This file is sourced only for interactive shells. It
+# should contain commands to set up aliases, functions,
+# options, key bindings, etc.
+#
+# Global Order: zshenv, zprofile, zshrc, zlogin
+
+READNULLCMD=${PAGER:-/usr/bin/pager}
+
+# An array to note missing features to ease diagnosis in case of problems.
+typeset -ga debian_missing_features
+
+if [[ -z "$DEBIAN_PREVENT_KEYBOARD_CHANGES" ]] &&
+   [[ "$TERM" != 'emacs' ]]
+then
+
+    typeset -A key
+    key=(
+        BackSpace  "${terminfo[kbs]}"
+        Home       "${terminfo[khome]}"
+        End        "${terminfo[kend]}"
+        Insert     "${terminfo[kich1]}"
+        Delete     "${terminfo[kdch1]}"
+        Up         "${terminfo[kcuu1]}"
+        Down       "${terminfo[kcud1]}"
+        Left       "${terminfo[kcub1]}"
+        Right      "${terminfo[kcuf1]}"
+        PageUp     "${terminfo[kpp]}"
+        PageDown   "${terminfo[knp]}"
+    )
+
+    function bind2maps () {
+        local i sequence widget
+        local -a maps
+
+        while [[ "$1" != "--" ]]; do
+            maps+=( "$1" )
+            shift
+        done
+        shift
+
+        sequence="${key[$1]}"
+        widget="$2"
+
+        [[ -z "$sequence" ]] && return 1
+
+        for i in "${maps[@]}"; do
+            bindkey -M "$i" "$sequence" "$widget"
+        done
+    }
+
+    bind2maps emacs             -- BackSpace   backward-delete-char
+    bind2maps       viins       -- BackSpace   vi-backward-delete-char
+    bind2maps             vicmd -- BackSpace   vi-backward-char
+    bind2maps emacs             -- Home        beginning-of-line
+    bind2maps       viins vicmd -- Home        vi-beginning-of-line
+    bind2maps emacs             -- End         end-of-line
+    bind2maps       viins vicmd -- End         vi-end-of-line
+    bind2maps emacs viins       -- Insert      overwrite-mode
+    bind2maps             vicmd -- Insert      vi-insert
+    bind2maps emacs             -- Delete      delete-char
+    bind2maps       viins vicmd -- Delete      vi-delete-char
+    bind2maps emacs viins vicmd -- Up          up-line-or-history
+    bind2maps emacs viins vicmd -- Down        down-line-or-history
+    bind2maps emacs             -- Left        backward-char
+    bind2maps       viins vicmd -- Left        vi-backward-char
+    bind2maps emacs             -- Right       forward-char
+    bind2maps       viins vicmd -- Right       vi-forward-char
+
+    # Make sure the terminal is in application mode, when zle is
+    # active. Only then are the values from $terminfo valid.
+    if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
+        function zle-line-init () {
+            emulate -L zsh
+            printf '%s' ${terminfo[smkx]}
+        }
+        function zle-line-finish () {
+            emulate -L zsh
+            printf '%s' ${terminfo[rmkx]}
+        }
+        zle -N zle-line-init
+        zle -N zle-line-finish
+    else
+        for i in {s,r}mkx; do
+            (( ${+terminfo[$i]} )) || debian_missing_features+=($i)
+        done
+        unset i
+    fi
+
+    unfunction bind2maps
+
+fi # [[ -z "$DEBIAN_PREVENT_KEYBOARD_CHANGES" ]] && [[ "$TERM" != 'emacs' ]]
+
+zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
+                                           /usr/local/bin  \
+                                           /usr/sbin       \
+                                           /usr/bin        \
+                                           /sbin           \
+                                           /bin            \
+                                           /usr/X11R6/bin
+
+(( ${+aliases[run-help]} )) && unalias run-help
+autoload -Uz run-help

Reply via email to