Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add scripts for fish shell #1100

Open
reyalka opened this issue Sep 9, 2024 · 1 comment
Open

add scripts for fish shell #1100

reyalka opened this issue Sep 9, 2024 · 1 comment

Comments

@reyalka
Copy link

reyalka commented Sep 9, 2024

Scripts for fish are required in the following document

following code is written in that document:

export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"

However, it is only for bash or zsh. The script for fish user is required
like this:

fish_add_path (set -q AQUA_ROOT_DIR; and echo $AQUA_ROOT_DIR; or set -q XDG_DATA_HOME; and echo $XDG_DATA_HOME; or echo $HOME/.local/share)/aquaproj-aqua/bin

(It is longer than sh script because fish shell doesn't have an operator :-)

@reyalka
Copy link
Author

reyalka commented Sep 9, 2024

or you can implement like below:

if set -q AQUA_ROOT_DIR
    set -l aqua_path $AQUA_ROOT_DIR
else if set -q XDG_DATA_HOME
    set -l aqua_path $XDG_DATA_HOME
else
    set -l aqua_path $HOME/.local/share
end
fish_add_path $aqua_path/aquaproj-aqua/bin

@reyalka reyalka changed the title add scripts for fish add scripts for fish shell Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant