diff --git a/Examples.md b/Examples.md index ac337cd..470d5d8 100644 --- a/Examples.md +++ b/Examples.md @@ -1645,13 +1645,13 @@ like normal autojump when used with arguments but displays an fzf prompt when us ```sh j() { - local preview_cmd="ls {2}" + local preview_cmd="ls {2..}" if command -v exa &> /dev/null; then preview_cmd="exa -l {2}" fi if [[ $# -eq 0 ]]; then - cd "$(autojump -s | sort -k1gr | awk '$1 ~ /[0-9]:/ && $2 ~ /^\// {print $1 " " $2}' | fzf --height 40% --reverse --inline-info --preview "$preview_cmd" --preview-window down:50% | awk '{print $2}')" + cd "$(autojump -s | sort -k1gr | awk -F : '$1 ~ /[0-9]/ && $2 ~ /^\s*\// {print $1 $2}' | fzf --height 40% --reverse --inline-info --preview "$preview_cmd" --preview-window down:50% | awk '{print $2}')" else cd $(autojump $@) fi