From 90e781a1928eae96554ba9c62dde0b8657b4d148 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Tue, 8 Mar 2022 10:53:30 +0530 Subject: [PATCH] Bypass alias in fzf preview (#329) --- CHANGELOG.md | 7 ++++--- src/fzf.rs | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a904bc1..edaf23d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,13 +12,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Manpages: moved to `man/man1/*.1`. -- Fzf: added `--keep-right` option by default, upgraded minimum version to v0.21.0. -- Bash: only enable completions on 4.4+. ### Fixed -- Rename `_z` completion function to avoid conflicts with other shell plugins. +- Bash/Zsh: rename `_z` completion function to avoid conflicts with other shell plugins. - Elvish: upgrade to new lambda syntax. +- Fzf: added `--keep-right` option by default, upgraded minimum version to v0.21.0. +- Bash: only enable completions on 4.4+. +- Fzf: bypass `ls` alias in preview window. ## [0.8.0] - 2021-12-25 diff --git a/src/fzf.rs b/src/fzf.rs index 6521d7d..ac4b30b 100644 --- a/src/fzf.rs +++ b/src/fzf.rs @@ -38,7 +38,8 @@ impl Fzf { "--bind=ctrl-z:ignore", ]); if cfg!(unix) { - command.arg("--preview=ls -p {2..}"); + command.env("SHELL", "sh"); + command.arg(r"--preview=\command -p ls -p {2..}"); } }