Commits

Randy Stauner committed a6c0463

Keep track of loose downloads for bash completion

Comments (0)

Files changed (3)

 
 # load the rest
 source_rc_files ~/.bashrc.d/* ~/.bashrc.local $EXTRA_BASHRC
+# completion after the others (so PATH is built, etc)
+source_rc_files ~/.bashrc.d/completion.d/contrib/* ~/.bashrc.d/completion.d/*

home/.bashrc.d/completion.bashrc

   fi
   unset bc_etc bc_user
 fi
-
-# custom completions
-source_rc_files ~/.bashrc.d/completion/*

scripts/contrib.sh

+#!/bin/bash
+
+completion="$HOME/.bashrc.d/completion.d/contrib"
+mkdir -p "$completion"
+
+function dl () {
+  dest="$1" url="$2"
+  test -e "$dest" || curl -sL "$url" > "$dest"
+}
+
+function dl_completion () {
+  dl "$completion/$1.bashrc" "$2"
+}
+
+dl_completion django https://github.com/django/django/raw/master/extras/django_bash_completion