From 2f175e6eb23162d3e93f626b5c8a1659ef285b4a Mon Sep 17 00:00:00 2001 From: zjp Date: Sat, 13 May 2023 15:51:39 +0800 Subject: [PATCH] config_file_example: shell command should be `cmd.exe` on Windows and add shell command debug in logging --- docs/config_file_example.yaml | 5 ++++- src/common/shell.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/config_file_example.yaml b/docs/config_file_example.yaml index ce14365..1eb7ab7 100644 --- a/docs/config_file_example.yaml +++ b/docs/config_file_example.yaml @@ -28,5 +28,8 @@ finder: # tags: git,!checkout # equivalent to the --tag-rules option shell: - command: bash # shell used for shell out. possible values: bash, zsh, dash, ... + # Shell used for shell out. Possible values: bash, zsh, dash, ... + # For Windows, use `cmd.exe` instead. + command: bash + # finder_command: bash # similar, but for fzf's internals diff --git a/src/common/shell.rs b/src/common/shell.rs index 331eb32..976128b 100644 --- a/src/common/shell.rs +++ b/src/common/shell.rs @@ -42,5 +42,6 @@ pub fn out() -> Command { cmd.args(words); let dash_c = if words_str.contains("cmd.exe") { "/c" } else { "-c" }; cmd.arg(dash_c); + debug!("shell cmd = `{cmd:#?}`"); cmd }