+######################################################################
+# The key-bindings themselves
+######################################################################
+
+ # M-t appends the selected history line and the end of the current
+ # one bind '"\C-[t":"\C-a\C-kselector-history\C-m\C-a\C-y\C-e"'
+
+if [[ "$1" ]]; then
+
+ while [[ "$1" ]]; do
+
+ case "$1" in
+
+ --hist)
+ # M-r puts the selected history line in place of the current one
+ bind '"\C-[r":"\C-a\C-kselector-history\C-m"'
+ ;;
+
+ --cd)
+ # M-c provides a dynamic list of directories to cd into
+ bind '"\C-[c":"\C-a\C-kselector-cd-search\C-m"'
+ ;;
+
+ *)
+ echo "Unknown argument $1" >&2
+ ;;
+ esac
+
+ shift