From 5ca8c756448e717cdb43ff60c9b562571a01708c Mon Sep 17 00:00:00 2001 From: Alex Birdsall Date: Wed, 17 Aug 2022 15:36:02 -0700 Subject: [PATCH] fix(file-templates): better recognize shell types There are some conventional files strongly associated with a non-bash shell which do not use an explicit `.zsh` file extension (e.g. `.zprofile`); the old logic would always use the `#!/usr/bin/env bash` shebang in these cases, which is a tiny little bummer. --- modules/editor/file-templates/templates/sh-mode/__ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/file-templates/templates/sh-mode/__ b/modules/editor/file-templates/templates/sh-mode/__ index 3bb86a69c..2f790dc17 100644 --- a/modules/editor/file-templates/templates/sh-mode/__ +++ b/modules/editor/file-templates/templates/sh-mode/__ @@ -1,3 +1,3 @@ -#!/usr/bin/env `(if (equal (file-name-extension buffer-file-name) "zsh") "zsh" "bash")` +#!/usr/bin/env `(format "%s" sh-shell)` $0