View file File name : zsh-common Content :#!/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')