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 guix item #525

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions functions/_tide_item_guix.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function _tide_item_guix
if test -n "$GUIX_ENVIRONMENT"
_tide_print_item guix $tide_guix_icon'' "[GUIX ENV]"
end
end
4 changes: 3 additions & 1 deletion functions/_tide_remove_unusable_items.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function _tide_remove_unusable_items
# Remove tool-specific items for tools the machine doesn't have installed
set -l removed_items
for item in aws bun crystal direnv distrobox docker elixir gcloud git go java kubectl nix_shell node php pulumi python ruby rustc terraform toolbox zig
for item in aws bun crystal direnv distrobox docker elixir gcloud git go java kubectl nix_shell node php pulumi python ruby rustc terraform toolbox zig guix
contains $item $tide_left_prompt_items $tide_right_prompt_items || continue

set -l cli_names $item
Expand All @@ -12,6 +12,8 @@ function _tide_remove_unusable_items
set cli_names nix nix-shell
case python
set cli_names python python3
case guix
set cli_names guix
end
type --query $cli_names || set -a removed_items $item
end
Expand Down
13 changes: 13 additions & 0 deletions tests/_tide_item_guix_shell.test.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# RUN: %fish %s
_tide_parent_dirs

function _guix_shell
_tide_decolor (_tide_item_guix)
end


_guix_shell # CHECK:

set -x GUIX_ENVIRONMENT "/gnu/store/test"

_guix_shell # CHECK: [GUIX ENV]
Loading