 (defun my/dired-sort()
   "Toggle sorting in dired buffers."
   (interactive)
-  (let ((type (ido-completing-read
-               "Sort by: "
-               '( "size" "extension" "ctime" "utime" "time" "name")
-               nil t)))
+  ( let ((type
+          (funcall
+           my/choose-func
+           '( "size" "extension" "ctime" "utime" "time" "name")
+           "Sort by:")))
     ;; on os x, extension (X) not supported;
     ;; also, ctime means time file status was last changed
     (cond ((string= type "size") (dired-sort-size))

;; Author: Dan Harms <danielrharms@gmail.com>
;; Created: Friday, February 27, 2015
;; Version: 1.0
;; Modified Time-stamp: <2015-09-24 14:00:33 dan.harms>
;; Modified by: Dan Harms
;; Keywords:


  (add-to-list 'my/completion-framework-alist
               (cons "ivy" 'my/activate-ivy))
  (global-set-key "\e\eii" 'ivy-resume)
  (require 'counsel)
  )

(defun my/activate-ido ()
