Skip to content

Commit

Permalink
Simplify a bit of code
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov committed Jul 18, 2020
1 parent dd3f0e5 commit bb5a133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crux.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bb5a133

Please sign in to comment.