From 516d837e198946b0fecc8f8e550f1d16fbff85c0 Mon Sep 17 00:00:00 2001 From: Tony Blyler <tony.blyler@cbinsights.com> Date: Tue, 5 Nov 2024 09:07:27 -0500 Subject: [PATCH 1/2] Use ripgrep for fzf first and then the silver searcher if it isn't available --- chezmoi/dot_zshenv | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/chezmoi/dot_zshenv b/chezmoi/dot_zshenv index 85982d7..20c194d 100644 --- a/chezmoi/dot_zshenv +++ b/chezmoi/dot_zshenv @@ -96,9 +96,16 @@ if [ -e "${XDG_RUNTIME_DIR}/docker.sock" ]; then export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock" fi -if command -v fzf &> /dev/null && command -v ag &> /dev/null; then - export FZF_DEFAULT_COMMAND='ag --skip-vcs-ignores --nocolor -g "" -l' - export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}" +if command -v fzf &> /dev/null; then + if command -v rg &> /dev/null; then + export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --glob '!.git'" + elif command -v ag &> /dev/null; then + export FZF_DEFAULT_COMMAND='ag --skip-vcs-ignores --nocolor -g "" -l' + fi + + if [ -n "${FZF_DEFAULT_COMMAND}" ]; then + export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}" + fi fi typeset -U path From 7ed5fab5d87c02aa0567cbb06b992f3409e7ab7e Mon Sep 17 00:00:00 2001 From: Tony Blyler <tony.blyler@cbinsights.com> Date: Tue, 5 Nov 2024 09:07:38 -0500 Subject: [PATCH 2/2] add orbstack sourcing if available --- chezmoi/dot_zshenv | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chezmoi/dot_zshenv b/chezmoi/dot_zshenv index 20c194d..e78d2ef 100644 --- a/chezmoi/dot_zshenv +++ b/chezmoi/dot_zshenv @@ -108,6 +108,10 @@ if command -v fzf &> /dev/null; then fi fi +if [ -r "${HOME}/.orbstack/shell/init.zsh" ]; then + source ~/.orbstack/shell/init.zsh 2>/dev/null || : +fi + typeset -U path # this is a hack to prevent MacOS from being smarter than us for PATH settings