(defun scroll-completions-down (&optional arg)
(interactive "p")
(save-excursion
(save-selected-window
(let ((compwin (get-buffer-window "*Completions*")))
(if compwin
(progn
(select-window compwin)
(call-interactively 'scroll-down)))))))
(defun scroll-completions-up (&optional arg)
(interactive "p")
(save-excursion
(save-selected-window
(let ((compwin (get-buffer-window "*Completions*")))
(if compwin
(progn
(select-window compwin)
(call-interactively 'scroll-up)))))))
(defun ins-buffer-file-name (relative)
"Insert the file name of the current buffer into the minibuffer."
(interactive "*P")
(let ((fn (buffer-file-name (car (cdr (buffer-list))))))
(if fn
(if (and relative
(= 0 (string-match
(regexp-quote (expand-file-name default-directory))
fn)))
(insert (substring fn (match-end 0)))
(insert fn))
(beep))))
(autoload 'comint-dynamic-complete-filename "comint"
"Dynamically complete the filename at point." t)
(setq cabo:shell-minibuffer-local-map (copy-keymap minibuffer-local-map))
(define-key cabo:shell-minibuffer-local-map
"\C-i" 'comint-dynamic-complete-filename)