Skip to content

Commit

Permalink
fix: avoid crash when fish_right_prompt is undefined
Browse files Browse the repository at this point in the history
Closes: #142

Signed-off-by: Bastian Fredriksson <bastian.fredriksson@keyfactor.com>
  • Loading branch information
Realiserad committed Jan 15, 2025
1 parent 78a27b1 commit 2dba595
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion conf.d/fish_ai.fish
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ function autoconfig_gh_models --description "Deploy configuration for GitHub Mod
end

function show_progess_indicator --description "Show a progress indicator."
if type -q fish_right_prompt
set rplen (string length -v (fish_right_prompt)[-1])
else
set rplen 0
end
# Move the cursor to the end of the line and insert progress indicator
tput hpa (math $COLUMNS - (string length -v (fish_right_prompt)[-1]) - 2)
tput hpa (math $COLUMNS - $rplen - 2)
echo -n ''
end
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fish_ai"
version = "1.0.2"
version = "1.0.3"
authors = [{ name = "Bastian Fredriksson", email = "realiserad@gmail.com" }]
description = "Provides core functionality for fish-ai, an AI plugin for the fish shell."
readme = "README.md"
Expand Down

0 comments on commit 2dba595

Please sign in to comment.