diff options
Diffstat (limited to 'debian/zsh.bug-script')
-rwxr-xr-x | debian/zsh.bug-script | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/zsh.bug-script b/debian/zsh.bug-script new file mode 100755 index 000000000..554ddb5f8 --- /dev/null +++ b/debian/zsh.bug-script @@ -0,0 +1,55 @@ +#!/bin/sh + +exec 1>&3 +exec 2>&3 + +list_packages() { + text="$1" + shift + if [ -n "$1" ]; then + printf "$text:\n\n" + dpkg-query -l "$@" + if [ -x /usr/bin/debsums ]; then + FILES="$(debsums -ce "$@")" + if [ -n "$FILES" ]; then + printf "\nThe following files were modified:\n\n$FILES\n" + fi + fi + fi + printf "\n" +} + +if [ -x /usr/bin/aptitude ]; then + TEXT="Packages which depend, recommend, suggest or enhance a zsh package and hence may provide code meant to be sourced in .zshrc" + PKGS=$(aptitude -q -F '%p' search '( ?enhances(?name(^zsh)) | ?depends(?name(^zsh)) | ?recommends(?name(^zsh)) | ?suggests(?name(^zsh)) ) !?source-package(^zsh$) ~i') +else + TEXT="Packages which provide code meant to be sourced in .zshrc" + # Hardcoded list of (future) packages containing code meant to be + # sourced in .zshrc + PKGS=$(dpkg-query -W -f '${Package}\n' \ + autojump \ + command-not-found \ + environment-modules \ + fizsh \ + oh-my-zsh \ + ondir \ + python-powerline \ + python3-powerline \ + rosbash \ + thefuck \ + zec \ + zgen \ + zsh-antigen \ + zsh-autosuggestions \ + zsh-syntax-highlighting \ + 'grml-*' \ + 2>/dev/null) +fi + +list_packages "$TEXT" $PKGS + +list_packages "Packages which provide vendor completions" \ +$(dpkg-query -S /usr/share/zsh/vendor-completions/ | awk -F: '{print $1}' | sed -e 's/,//g') + +list_packages "Packages which provide vendor functions" \ +$(dpkg-query -S /usr/share/zsh/vendor-functions/ | awk -F: '{print $1}' | sed -e 's/,//g') |