+ ## install port dependencies from pkg (like pkgsrc `bmake bin-install')
+ #XXX: should probably use package-depends where possible, breaks when
+ # port name is different to package name
+ # (eg. graphics/sdl20 == sdl2, devel/glib20 == glib2, etc)
+ function portpkg {
+ case "$1" {
+ build|run)
+ sudo pkg install -AU $(make ${1}-depends-list |
+ sed 's_/usr/ports/_ _' | tr -d '\n')
+ ;;
+ *) echo "Usage: \`portpkg <build|run>' in a port directory"
+ return 1;;
+ }
+ };;
+ netbsd)
+ ## sound
+ function s {
+ if [[ -z "$1" ]] {
+ ll /dev/mixer /dev/sound /dev/audio
+ return
+ }
+ for x in mixer sound audio; do
+ ln -sf /dev/$x"$1" /dev/$x
+ done
+ }
+ function vol {
+ if [[ -z "$1" ]] {
+ for x in $(mixerctl -a | grep 'outputs\.master'); do
+ echo $x
+ done
+ return
+ }
+ mixerctl -w outputs.master"$2"="$1"
+ };;
+ *)
+ ## sound
+ # TODO: test alsa/oss/sndio/portaudio/pulse in order of importance
+ function s() {}
+ function vol() {}
+esac
+
+### modules & styles
+## vcs
+zstyle ':vcs_info:*' enable git
+#zstyle ':vcs_info:git*' check-for-changes true #too slow
+zstyle ':vcs_info:git*:dotfiles' check-for-changes true
+zstyle ':vcs_info:git*' check-for-staged-changes true
+autoload -Uz vcs_info
+
+## compinit
+zstyle ':completion:*' auto-description '[arg] %d'