branch: elpa/crux
commit bb5a133d2a5db7181524fe679e3f99f44a98426b
Author: Bozhidar Batsov <bozhi...@batsov.com>
Commit: Bozhidar Batsov <bozhi...@batsov.com>

    Simplify a bit of code
---
 crux.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crux.el b/crux.el
index fdf6bef..1580be5 100644
--- a/crux.el
+++ b/crux.el
@@ -675,7 +675,7 @@ Doesn't mess with special buffers."
 (defun crux-find-shell-init-file ()
   "Edit the shell init file in another window."
   (interactive)
-  (let* ((shell (car (reverse (split-string (getenv "SHELL") "/" t))))
+  (let* ((shell (file-name-nondirectory (getenv "SHELL")))
          (shell-init-file (cond
                            ((string= "zsh" shell) crux-shell-zsh-init-files)
                            ((string= "bash" shell) crux-shell-bash-init-files)

Reply via email to