Support Elisp fns for current buffer's dirname

Gets the shorthand version of the buffer's current directory's name.
This commit is contained in:
William Carroll 2018-05-29 16:23:24 -04:00
parent 9b8f0c2da3
commit 32ac66d50b

View file

@ -223,5 +223,11 @@
(term-char-mode) (term-char-mode)
(term-line-mode))) (term-line-mode)))
(defun buffer-dirname ()
"Return the directory name of the current buffer as a string."
(->> buffer-file-name
f-dirname
f-filename))
(provide 'functions) (provide 'functions)
;;; functions.el ends here ;;; functions.el ends here