From 2757306ef1b729b44835b479a7f7b429dc6e499e 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 16:00:58 +0000 Subject: [PATCH] refactor(jump): improve robustness of getmark function This commit refactors the `getmark` function in the `jump` plugin to improve its robustness and consistency with the rest of the file. The `LANG=` prefix is added to ensure that the output of the `realpath` command is in a consistent, predictable format. The `command` prefix is used to bypass any potential aliases for `realpath` and `echo`, ensuring that the script executes the intended commands. --- plugins/jump/jump.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index c2b21e92e..8df5cde55 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -45,11 +45,16 @@ marks() { done } +function getmark { + LANG= command echo $(command realpath "$MARKPATH/$1") || command echo "No such mark: $1" +} + _completemarks() { reply=("${MARKPATH}"/{,.}*(@N:t)) } compctl -K _completemarks jump compctl -K _completemarks unmark +compctl -K _completemarks getmark _mark_expansion() { setopt localoptions extendedglob