A
Это какая-то дефолтная функция emacs?
setq — это не функция, а макрос, но это уже детали.
Size: a a a
A
A
A
A
~/.doom.d/config.el
U
VI
А
S
VI
PG
VI
PG
AP
VI
:bind (:map eshell-hist-mode-map
("<down>" . 'next-line)
("<up>" . 'previous-line)
([remap eshell-previous-matching-input-from-input] . helm-eshell-history)
([remap eshell-list-history] . helm-eshell-history)
))
PG
VI
VI
(use-package eshell
:config
(require 'em-hist)
(use-package eshell-git-prompt
:config
;; the powerline prompt is best but I've no idea how to shorten it to the last directory.
(eshell-git-prompt-use-theme 'powerline)
(define-advice eshell-git-prompt-powerline-dir (:override () short)
"Show only last directory."
(file-name-nondirectory (directory-file-name default-directory))))
:bind (:map eshell-hist-mode-map
("<down>" . 'next-line)
("<up>" . 'previous-line)
([remap eshell-previous-matching-input-from-input] . helm-eshell-history)
([remap eshell-list-history] . helm-eshell-history)
))
PG
PG
(use-package eshell
:config
(require 'em-hist)
(use-package eshell-git-prompt
:config
;; the powerline prompt is best but I've no idea how to shorten it to the last directory.
(eshell-git-prompt-use-theme 'powerline)
(define-advice eshell-git-prompt-powerline-dir (:override () short)
"Show only last directory."
(file-name-nondirectory (directory-file-name default-directory))))
:bind (:map eshell-hist-mode-map
("<down>" . 'next-line)
("<up>" . 'previous-line)
([remap eshell-previous-matching-input-from-input] . helm-eshell-history)
([remap eshell-list-history] . helm-eshell-history)
))
(cl-defun fish-prompt (&optional (filename default-directory))
"A simple prompt with a fish-like abbreviation of `$PWD'."
(let ((cwd (or (file-remote-p filename 'localname) filename)))
(concat
"\f\n"
(file-remote-p cwd)
(replace-regexp-in-string
"[^./][^/]*/"
(lambda (match) (string (aref match 0) ?/))
(substring (abbreviate-file-name cwd) 0 -1))
;; Add slash if it was the only character in the filename.
(when (file-equal-p "/" cwd) "/")
(if (zerop (user-uid)) " # " " $ "))))
VI