Fix distrobox prompt support (#351)

* Fix distrobox prompt support

* Fix distrobox prompt support

* Fix distrobox prompt support

* Fix distrobox prompt support

* Fix distrobox prompt support

* Fix distrobox prompt support

* Simplify and format

* Fix distrobox prompt support

* Remove extraneous command

Co-authored-by: Ilan Cosman <ilancosman@gmail.com>
This commit is contained in:
Taha 2022-10-15 00:10:27 +03:00 committed by GitHub
parent 0a83ef6af8
commit 0cf2993d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
function _tide_item_distrobox
test -e /run/.distroboxenv &&
test -e /etc/profile.d/distrobox_profile.sh && test -e /run/.containerenv &&
_tide_print_item distrobox $tide_distrobox_icon' ' (string match -rg 'name="(.*)"' </run/.containerenv)
end

View File

@ -4,6 +4,8 @@ function _tide_remove_unusable_items
for item in aws chruby crystal distrobox docker git go java kubectl nix_shell node php pulumi rustc terraform toolbox virtual_env
set -l cli_names $item
switch $item
case distrobox # there is no 'distrobox' command inside the container
set cli_names distrobox-export # 'distrobox-export' and 'distrobox-host-exec' are available
case virtual_env
set cli_names python python3
case nix_shell

View File

@ -95,7 +95,7 @@ tide_pwd_icon_home
tide_pwd_icon_unwritable
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json
tide_right_prompt_frame_enabled true
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc java php pulumi chruby go kubectl toolbox terraform aws nix_shell crystal
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc java php pulumi chruby go kubectl distrobox toolbox terraform aws nix_shell crystal
tide_right_prompt_prefix
tide_right_prompt_separator_diff_color
tide_right_prompt_separator_same_color

View File

@ -95,7 +95,7 @@ tide_pwd_icon_home
tide_pwd_icon_unwritable
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json
tide_right_prompt_frame_enabled false
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc java php pulumi chruby go kubectl toolbox terraform aws nix_shell crystal
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc java php pulumi chruby go kubectl distrobox toolbox terraform aws nix_shell crystal
tide_right_prompt_prefix ' '
tide_right_prompt_separator_diff_color ' '
tide_right_prompt_separator_same_color ' '

View File

@ -95,7 +95,7 @@ tide_pwd_icon_home
tide_pwd_icon_unwritable
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json
tide_right_prompt_frame_enabled true
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc java php pulumi chruby go kubectl toolbox terraform aws nix_shell crystal
tide_right_prompt_items status cmd_duration context jobs node virtual_env rustc java php pulumi chruby go kubectl distrobox toolbox terraform aws nix_shell crystal
tide_right_prompt_prefix
tide_right_prompt_separator_diff_color
tide_right_prompt_separator_same_color