3333#
3434CURSOR_DIR=" $HOME /.local/share/cvm"
3535DOWNLOADS_DIR=" $CURSOR_DIR /app-images"
36- CVM_VERSION=" 1.3 .0"
36+ CVM_VERSION=" 1.4 .0"
3737_CACHE_FILE=" /tmp/cursor_versions.json"
3838VERSION_HISTORY_URL=" https://raw.githubusercontent.com/oslook/cursor-ai-downloads/refs/heads/main/version-history.json"
3939GITHUB_API_URL=" https://api.github.com/repos/ivstiv/cursor-version-manager/releases/latest"
@@ -197,6 +197,14 @@ installCVM() {
197197 echo " alias cursor='$CURSOR_DIR /active'" >> " $HOME /.zshrc"
198198 fi
199199 ;;
200+ fish)
201+ if [ ! -f " $HOME /.config/fish/functions/cursor.fish" ] || ! grep -q " function cursor" " $HOME /.config/fish/functions/cursor.fish" ; then
202+ mkdir -p " $HOME /.config/fish/functions"
203+ echo " function cursor" > " $HOME /.config/fish/functions/cursor.fish"
204+ echo " $CURSOR_DIR /active \$ argv" >> " $HOME /.config/fish/functions/cursor.fish"
205+ echo " end" >> " $HOME /.config/fish/functions/cursor.fish"
206+ fi
207+ ;;
200208 esac
201209 echo " Alias added. You can now use 'cursor' to run Cursor."
202210 case " $( basename " $SHELL " ) " in
@@ -209,6 +217,9 @@ installCVM() {
209217 zsh)
210218 echo " Run 'source ~/.zshrc' to apply the changes or restart your shell."
211219 ;;
220+ fish)
221+ echo " The cursor function has been added in ~/.config/fish/functions/cursor.fish. You can use it immediately."
222+ ;;
212223 esac
213224}
214225
@@ -236,6 +247,12 @@ uninstallCVM() {
236247 echo " Run 'source ~/.zshrc' to apply the changes or restart your shell."
237248 fi
238249 ;;
250+ fish)
251+ if [ -f " $HOME /.config/fish/functions/cursor.fish" ]; then
252+ rm " $HOME /.config/fish/functions/cursor.fish"
253+ echo " Cursor function removed from ~/.config/fish/functions/cursor.fish"
254+ fi
255+ ;;
239256 esac
240257 echo " Cursor version manager uninstalled."
241258}
@@ -252,7 +269,7 @@ checkDependencies() {
252269
253270isShellSupported () {
254271 case " $( basename " $SHELL " ) " in
255- sh|dash|bash|zsh)
272+ sh|dash|bash|zsh|fish )
256273 return 0
257274 ;;
258275 * )
@@ -326,7 +343,7 @@ updateScript() {
326343# Execution
327344#
328345if ! isShellSupported; then
329- echo " Error: Unsupported shell. Please use bash, zsh, or sh."
346+ echo " Error: Unsupported shell. Please use bash, zsh, fish, or sh."
330347 echo " Currently using: $( basename " $SHELL " ) "
331348 echo " Open a github issue if you want to add support for your shell:"
332349 echo " https://github.com/ivstiv/cursor-version-manager/issues"
0 commit comments