From dff57f2dd34729b4d5968fddeef6818861c9c257 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 18 Oct 2025 17:20:21 +0000 Subject: [PATCH] fix(jump): correct error handling in getmark function This commit fixes a bug in the `getmark` function where it would not correctly handle non-existent marks. The previous implementation would swallow the error from `realpath`, causing the `||` condition to not be triggered. This has been corrected by removing the command substitution and directly checking the exit code of `realpath`. The error message is now correctly printed to stderr, and the function returns a non-zero exit code on failure. --- plugins/jump/jump.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 8df5cde55..a0d687c5d 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -46,7 +46,7 @@ marks() { } function getmark { - LANG= command echo $(command realpath "$MARKPATH/$1") || command echo "No such mark: $1" + LANG= command realpath "$MARKPATH/$1" 2>/dev/null || { command echo "No such mark: $1" >&2; return 1; } } _completemarks() {