diff options
author | JSDurand <mmemmew@gmail.com> | 2021-09-06 14:10:39 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-09-06 14:10:39 +0800 |
commit | 2c4f4538a927b62c01ee61c8c141a98965670d9e (patch) | |
tree | cd5baf5eadf5d6c64494e8d06de9ecc71f84338a | |
parent | 078ef17def8a50f3c98af85b259ae745b6c5e231 (diff) |
eshell: formatting and a time comparison
* eshell-conf.el (eshell-current-command-stop): I shall compare both
the number of seconds and the number of micro-seconds.
Fix other formatting issues as well.
-rw-r--r-- | eshell-conf.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/eshell-conf.el b/eshell-conf.el index 119ca96..0b191cb 100644 --- a/eshell-conf.el +++ b/eshell-conf.el @@ -58,7 +58,7 @@ (format-seconds "%yy %dd %hh %mm %ss%z" elapsed-time-int)) (microseconds (caddr elapsed-time-list)) (micro-str - (cond ((> microseconds 10000) + (cond ((or (>= elaped-time-int 1) (> microseconds 10000)) (format "%dμs" microseconds))))) (setq eshell-prompt-time-string (mapconcat #'identity @@ -221,7 +221,13 @@ Just for the completeness." ;;;###autoload (defun durand-eshell-delete-dups (sequence &rest args) - "Delete duplicate elements in SEQUENCE. + "Return a copy of SEQUENCE with duplicate elements removed. +ARGS should be a property list specifying tests and keys. + +If the keyword argument TEST is non-nil, it should be a function +with two arguments which tests for equality of elements in the +sequence. The default is the function `equal'. + If the keyword argument TEST is non-nil, it should be a function with two arguments which tests for equality of elements in the sequence. The default is the function `equal'. @@ -248,7 +254,7 @@ supposed to leave the global state alone as well. found-table result) (cond ((or (= (mod (length args) 2) 1) (> (length args) (* 2 valid-key-num))) - (user-error "Invalid keyword arguments. Only :key and :test are allowed, but got %S" + (user-error "Invalid keyword arguments. Only :key and :test are allowed, but got %S" args))) ;; Note: This just puts a property to the symbol. (define-hash-table-test 'durand-delete-dups-test @@ -272,8 +278,8 @@ supposed to leave the global state alone as well. (defun eshell-j (&optional short-cut use-recent-p) "Jump to SHORT-CUT. Where this jumps to is determined by the symbolic links in the -directory '~/.marks'. If USE-RECENT-P is non-nil, then also -include recent directories in the list of candidates. Moreover, +directory `eshell-mark-directory'. If USE-RECENT-P is non-nil, then +also include recent directories in the list of candidates. Moreover, if USE-RECENT-P is 'exclusive, then only list the recent directories as candidates, unless there are no recent directories, in which case it falls back to use the marks as the |