Created
June 13, 2013 17:27
-
-
Save agumonkey/5775585 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun filter-char (f) (car f)) | |
(defun filter-fn (f) (cdr f)) | |
(mapcar (lambda (f) (cons (char-to-string (filter-char f)) (filter-fn f))) eshell-modifier-alist) | |
;; -> | |
;; (("E" function (lambda (lst) (mapcar (function (lambda (str) (eshell-stringify (car (eshell-parse-argument str))))) lst))) | |
;; ("L" function (lambda (lst) (mapcar (quote downcase) lst))) | |
;; ("U" function (lambda (lst) (mapcar (quote upcase) lst))) | |
;; ("C" function (lambda (lst) (mapcar (quote capitalize) lst))) | |
;; ("h" function (lambda (lst) (mapcar (quote file-name-directory) lst))) | |
;; ("i" eshell-include-members) | |
;; ("x" eshell-include-members t) | |
;; ("r" function (lambda (lst) (mapcar (quote file-name-sans-extension) lst))) | |
;; ("e" function (lambda (lst) (mapcar (quote file-name-extension) lst))) | |
;; ("t" function (lambda (lst) (mapcar (quote file-name-nondirectory) lst))) | |
;; ("q" function (lambda (lst) (mapcar (quote eshell-escape-arg) lst))) | |
;; ("u" function (lambda (lst) (eshell-uniqify-list lst))) | |
;; ("o" function (lambda (lst) (sort lst (quote string-lessp)))) | |
;; ("O" function (lambda (lst) (nreverse (sort lst (quote string-lessp))))) | |
;; ("j" eshell-join-members) | |
;; ("S" eshell-split-members) | |
;; ("R" quote reverse) | |
;; ("g" progn (forward-char) (if (eq (char-before) 115) (eshell-pred-substitute t) (error "`g' modifier cannot be used alone"))) | |
;; ("s" eshell-pred-substitute)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment