Compare commits

...

6 Commits

Author SHA1 Message Date
Ilan Cosman
52268dd8f5 Reformat gcloud item 2023-12-24 11:57:20 -08:00
Ilan Cosman
cca9fc9f82 Reformat direnv item 2023-12-24 11:31:30 -08:00
Ilan Cosman
5de481de1b Add terraform icon 2023-12-24 11:21:59 -08:00
Ilan Cosman
1759ebbae0 Minor edits to terraform item 2023-12-24 11:14:27 -08:00
Ilan Cosman
9bd47e8256 Remove erroneous testing code 2023-12-24 10:44:20 -08:00
Ilan Cosman
d3a2d099eb changelog for v6.1.0 2023-12-22 17:05:47 -08:00
7 changed files with 29 additions and 31 deletions

View File

@ -1,5 +1,16 @@
# Changelog
## [v6.1.0][] (???)
### Features
- Add a new `zig` item ([#452][] - @TheFunctionalGuy)
### Bug fixes
- Fix the `python` item only using `python` and not `python3` ([#459][])
- Fix transience not working when trying to run a command during the previous command's execution ([#455][])
## [v6.0.1][] (Oct 04 2023)
### Bug fixes
@ -552,6 +563,9 @@
[#398]: https://github.com/IlanCosman/tide/pull/398
[#399]: https://github.com/IlanCosman/tide/issues/399
[#437]: https://github.com/IlanCosman/tide/issues/437
[#452]: https://github.com/IlanCosman/tide/issues/452
[#455]: https://github.com/IlanCosman/tide/issues/455
[#459]: https://github.com/IlanCosman/tide/issues/459
[prettier action]: https://github.com/actionsx/prettier
[super-linter]: https://github.com/github/super-linter
[v1.0.0]: https://github.com/IlanCosman/tide/tree/v1.0.0

View File

@ -1,7 +1,7 @@
function _tide_item_direnv
set -q DIRENV_DIR || return
direnv status | string match -q 'Found RC allowed false' \
&& set -lx tide_direnv_color $tide_direnv_color_denied \
&& set -lx tide_direnv_bg_color $tide_direnv_bg_color_denied
direnv status | string match -q 'Found RC allowed false' &&
set -lx tide_direnv_color $tide_direnv_color_denied &&
set -lx tide_direnv_bg_color $tide_direnv_bg_color_denied
_tide_print_item direnv $tide_direnv_icon
end

View File

@ -1,8 +1,8 @@
function _tide_item_gcloud
set -q CLOUDSDK_CONFIG || set -l CLOUDSDK_CONFIG ~/.config/gcloud
path is $CLOUDSDK_CONFIG/active_config \
&& read -l config <$CLOUDSDK_CONFIG/active_config \
&& path is $CLOUDSDK_CONFIG/configurations/config_$config \
&& string match -qr '^\s*project\s*=\s*(?<project>.*)' <$CLOUDSDK_CONFIG/configurations/config_$config \
&& _tide_print_item gcloud $tide_gcloud_icon' ' $project
path is $CLOUDSDK_CONFIG/active_config &&
read -l config <$CLOUDSDK_CONFIG/active_config &&
path is $CLOUDSDK_CONFIG/configurations/config_$config &&
string match -qr '^\s*project\s*=\s*(?<project>.*)' <$CLOUDSDK_CONFIG/configurations/config_$config &&
_tide_print_item gcloud $tide_gcloud_icon' ' $project
end

View File

@ -1,6 +1,5 @@
function _tide_item_terraform
if path is $_tide_parent_dirs/.terraform
terraform workspace show | read -l workspace
test $workspace != default && _tide_print_item terraform $tide_terraform_icon' ' $workspace
end
path is $_tide_parent_dirs/.terraform &&
terraform workspace show | string match -v default | read -l w &&
_tide_print_item terraform $tide_terraform_icon' ' $w
end

View File

@ -151,23 +151,6 @@ end"
if test "$tide_prompt_transient_enabled" = true
function _tide_enter_transient
set -l line (commandline --line)
commandline --search-mode
set -l search_mode_status $status
commandline --paging-mode
set -l paging_mode_status $status
commandline --paging-full-mode
set -l paging_full_mode_status $status
commandline --is-valid
set -l is_valid_status $status
echo "line: $line, search: $search_mode_status, paging: $paging_mode_status, paging_full: $paging_full_mode_status, is_valid: $is_valid_status" >>~/commandline_status
# If the commandline will be executed, or is empty
if commandline --is-valid || test -z "$(commandline)"
set -g _tide_transient

View File

@ -31,7 +31,7 @@ tide_rustc_icon 
tide_shlvl_icon
tide_status_icon
tide_status_icon_failure
tide_terraform_icon
tide_terraform_icon 󱁢
tide_toolbox_icon
tide_vi_mode_icon_default D
tide_vi_mode_icon_insert I

View File

@ -5,6 +5,8 @@ function _terraform
_tide_decolor (_tide_item_terraform)
end
set -lx tide_terraform_icon 󱁢
set -l terraformDir (mktemp -d)
cd $terraformDir
@ -15,6 +17,6 @@ mkdir .terraform
_terraform # CHECK:
mock terraform "workspace show" "echo test"
_terraform # CHECK: test
_terraform # CHECK: 󱁢 test
command rm -r $terraformDir