Skip to content

Commit

Permalink
Fix some eshell stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gopar committed Aug 2, 2024
1 parent b27d78c commit 6d7b837
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -768,21 +768,7 @@ When called with a prefix aurgument, it will open annotations file."
(eshell-input-filter-default input)
(eshell-input-filter-initial-space input)))

(defun eshell/ff (&rest args)
"Open files in emacs.
Stolen form aweshell"
(if (null args)
;; If I just ran "emacs", I probably expect to be launching
;; Emacs, which is rather silly since I'm already in Emacs.
;; So just pretend to do what I ask.
(bury-buffer)
;; We have to expand the file names or else naming a directory in an
;; argument causes later arguments to be looked for in that directory,
;; not the starting directory
(mapc #'find-file (mapcar #'expand-file-name (eshell-flatten-list (reverse args)))))
)

(defun eshell/cat (filename)
(defun eshell/cat-with-syntax-highlighting (filename)
"Like cat(1) but with syntax highlighting.
Stole from aweshell"
(let ((existing-buffer (get-file-buffer filename))
Expand All @@ -799,6 +785,7 @@ Stole from aweshell"
(unless existing-buffer
(kill-buffer buffer))
nil))
(advice-add 'eshell/cat :override #'eshell/cat-with-syntax-highlighting)

(defun gopar/sync-dir-in-buffer-name ()
"Update eshell buffer to show directory path.
Expand Down Expand Up @@ -845,15 +832,6 @@ Stolen from aweshell."
(add-to-list 'eshell-git-prompt-themes
'(powerline-plus eshell-git-prompt-powerline-venv eshell-git-prompt-powerline-regexp))
(eshell-git-prompt-use-theme 'powerline-plus))

;; (use-package powerline-with-pyvenv
;; :ensure nil
;; :after eshell-git-prompt
;; :load-path "lisp/themes/powerline-with-venv"
;; :config
;; (add-to-list 'eshell-git-prompt-themes
;; '(powerline-plus eshell-git-prompt-powerline-pyvenv eshell-git-prompt-powerline-regexp))
;; (eshell-git-prompt-use-theme 'powerline-plus))
#+end_src

*** COMMENT Eshell Auto Fish History
Expand Down

0 comments on commit 6d7b837

Please sign in to comment.