diff --git a/README.md b/README.md index a275f12..f886ad2 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ See [FZF Bindings](#fzf-bindings) under Key Bindings for the default FZF shortcu ## Integrations +> **Note:** All integrations listed below are designed to elegantly fallback to basic commands or safely ignore their configuration if their required external dependencies are not installed on the system. + ### Zoxide Smart `cd` replacement. `cd` (or `z`) `` jumps to the best frecency match; `cdi` (or `zi`) opens an interactive selector. diff --git a/conf.d/tailscale.fish b/conf.d/tailscale.fish index 10af6b3..dce3602 100644 --- a/conf.d/tailscale.fish +++ b/conf.d/tailscale.fish @@ -14,6 +14,10 @@ # fish completion for tailscale -*- shell-script -*- +if not type -q tailscale + return +end + function __tailscale_debug set -l file "$BASH_COMP_DEBUG_FILE" if test -n "$file" diff --git a/conf.d/wakatime.fish b/conf.d/wakatime.fish index cb2d75f..bedd7e0 100644 --- a/conf.d/wakatime.fish +++ b/conf.d/wakatime.fish @@ -29,7 +29,6 @@ function __register_wakatime_fish_before_exec -e fish_postexec else if type -p ~/.wakatime/wakatime-cli 2>&1 > /dev/null set wakatime_path (type -p ~/.wakatime/wakatime-cli) else - echo "wakatime command not found. Please read \"https://wakatime.com/terminal\" and install wakatime." return 1 end diff --git a/conf.d/zoxide.fish b/conf.d/zoxide.fish index 2c29a00..17f7e62 100644 --- a/conf.d/zoxide.fish +++ b/conf.d/zoxide.fish @@ -1,8 +1,13 @@ # ============================================================================= # +# # Utility functions for zoxide. # +if not type -q zoxide + return +end + # pwd based on the value of _ZO_RESOLVE_SYMLINKS. function __zoxide_pwd builtin pwd -L diff --git a/config.fish b/config.fish index 7a34463..16ca6e8 100644 --- a/config.fish +++ b/config.fish @@ -81,7 +81,9 @@ set -Ux FZF_DEFAULT_OPTS "\ # # The Auto-Venv script above will ignore directories with a # .envrc file (direnv configuration) to prevent conflicts. -direnv hook fish | source +if type -q direnv + direnv hook fish | source +end # ────────────────────────────── Auto-Venv ─────────────────────────────── # Auto-activate Python venv on directory change