From e87d05b80704f473d656fdd909d63968574f0061 Mon Sep 17 00:00:00 2001 From: Shine Nelson <4771718+shinenelson@users.noreply.github.com> Date: Mon, 9 Jun 2025 19:22:36 +0530 Subject: [PATCH 1/4] rename todo aliases file to avoid activation failure resolves #2314 --- .../available/{todo.txt-cli.aliases.bash => todo.aliases.bash} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename aliases/available/{todo.txt-cli.aliases.bash => todo.aliases.bash} (100%) diff --git a/aliases/available/todo.txt-cli.aliases.bash b/aliases/available/todo.aliases.bash similarity index 100% rename from aliases/available/todo.txt-cli.aliases.bash rename to aliases/available/todo.aliases.bash From bb05f0d9c713851a0a1ebe5bedb3adaab5a2eabc Mon Sep 17 00:00:00 2001 From: Shine Nelson <4771718+shinenelson@users.noreply.github.com> Date: Mon, 9 Jun 2025 19:52:38 +0530 Subject: [PATCH 2/4] fix test --- test/lib/helpers.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index 806a0ce8c0..0ba34b2706 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -713,5 +713,5 @@ function __migrate_all_components() { @test "helpers: describe the todo.txt-cli aliases without enabling them" { run _bash-it-aliases - assert_line "todo.txt-cli [ ] todo.txt-cli abbreviations" + assert_line "todo [ ] todo.txt-cli abbreviations" } From a09e96cd727b2f85725f7d400e67611f2b65f48d Mon Sep 17 00:00:00 2001 From: Shine Nelson <4771718+shinenelson@users.noreply.github.com> Date: Tue, 17 Jun 2025 13:43:58 +0530 Subject: [PATCH 3/4] rename todo.txt-cli occurances in test files --- test/completion/bash-it.completion.bats | 24 ++++++++++++------------ test/lib/helpers.bats | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/completion/bash-it.completion.bats b/test/completion/bash-it.completion.bats index 8ee9ef0722..8bea0b1fad 100644 --- a/test/completion/bash-it.completion.bats +++ b/test/completion/bash-it.completion.bats @@ -224,36 +224,36 @@ function __check_completion() { } @test "completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and name" { - run ln -s "$BASH_IT/aliases/available/todo.txt-cli.aliases.bash" "$BASH_IT/aliases/enabled/todo.txt-cli.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/todo.txt-cli.aliases.bash" + run ln -s "$BASH_IT/aliases/available/todo.aliases.bash" "$BASH_IT/aliases/enabled/todo.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/todo.aliases.bash" run ln -s "$BASH_IT/plugins/available/todo.plugin.bash" "$BASH_IT/plugins/enabled/todo.plugin.bash" assert_link_exist "$BASH_IT/plugins/enabled/todo.plugin.bash" run __check_completion 'bash-it disable alias to' - assert_output "todo.txt-cli" + assert_output "todo" } @test "completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and priority-based name" { - run ln -s "$BASH_IT/aliases/available/todo.txt-cli.aliases.bash" "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" + run ln -s "$BASH_IT/aliases/available/todo.aliases.bash" "$BASH_IT/aliases/enabled/150---todo.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/150---todo.aliases.bash" run ln -s "$BASH_IT/plugins/available/todo.plugin.bash" "$BASH_IT/plugins/enabled/350---todo.plugin.bash" assert_link_exist "$BASH_IT/plugins/enabled/350---todo.plugin.bash" run __check_completion 'bash-it disable alias to' - assert_output "todo.txt-cli" + assert_output "todo" } @test "completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the new location and priority-based name" { - run ln -s "$BASH_IT/aliases/available/todo.txt-cli.aliases.bash" "$BASH_IT/enabled/150---todo.txt-cli.aliases.bash" - assert_link_exist "$BASH_IT/enabled/150---todo.txt-cli.aliases.bash" + run ln -s "$BASH_IT/aliases/available/todo.aliases.bash" "$BASH_IT/enabled/150---todo.aliases.bash" + assert_link_exist "$BASH_IT/enabled/150---todo.aliases.bash" run ln -s "$BASH_IT/plugins/available/todo.plugin.bash" "$BASH_IT/enabled/350---todo.plugin.bash" assert_link_exist "$BASH_IT/enabled/350---todo.plugin.bash" run __check_completion 'bash-it disable alias to' - assert_output "todo.txt-cli" + assert_output "todo" } @test "completion bash-it: enable - provide the atom aliases when not enabled" { @@ -343,7 +343,7 @@ function __check_completion() { assert_link_exist "$BASH_IT/plugins/enabled/todo.plugin.bash" run __check_completion 'bash-it enable alias to' - assert_output "todo.txt-cli" + assert_output "todo" } @test "completion bash-it: enable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and priority-based name" { @@ -351,7 +351,7 @@ function __check_completion() { assert_link_exist "$BASH_IT/plugins/enabled/350---todo.plugin.bash" run __check_completion 'bash-it enable alias to' - assert_output "todo.txt-cli" + assert_output "todo" } @test "completion bash-it: enable - provide the todo.txt-cli aliases when todo plugin is enabled with the new location and priority-based name" { @@ -359,5 +359,5 @@ function __check_completion() { assert_link_exist "$BASH_IT/enabled/350---todo.plugin.bash" run __check_completion 'bash-it enable alias to' - assert_output "todo.txt-cli" + assert_output "todo" } diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index 0ba34b2706..1496ea0f21 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -439,14 +439,14 @@ function local_setup() { assert_link_exist "${BASH_IT?}/enabled/250---ssh.plugin.bash" run _bash-it-migrate - assert_line -n 0 'Migrating alias todo.txt-cli.' - assert_line -n 1 'todo.txt-cli disabled.' - assert_line -n 2 'todo.txt-cli enabled with priority 150.' + assert_line -n 0 'Migrating alias todo.' + assert_line -n 1 'todo disabled.' + assert_line -n 2 'todo enabled with priority 150.' assert_link_exist "${BASH_IT?}/enabled/225---nvm.plugin.bash" assert_link_exist "${BASH_IT?}/enabled/250---node.plugin.bash" assert_link_exist "${BASH_IT?}/enabled/250---ssh.plugin.bash" - assert_link_exist "${BASH_IT?}/enabled/150---todo.txt-cli.aliases.bash" + assert_link_exist "${BASH_IT?}/enabled/150---todo.aliases.bash" assert [ ! -L "${BASH_IT?}/plugins/enabled/node.plugin.bash" ] assert [ ! -L "${BASH_IT?}/plugins/enabled/nvm.plugin.bash" ] assert [ ! -L "${BASH_IT?}/aliases/enabled/todo.txt-cli.aliases.bash" ] @@ -469,10 +469,10 @@ function local_setup() { assert_link_exist "${BASH_IT?}/enabled/225---nvm.plugin.bash" assert_link_exist "${BASH_IT?}/enabled/250---node.plugin.bash" assert_link_exist "${BASH_IT?}/enabled/250---ssh.plugin.bash" - assert_link_exist "${BASH_IT?}/enabled/150---todo.txt-cli.aliases.bash" + assert_link_exist "${BASH_IT?}/enabled/150---todo.aliases.bash" assert [ ! -L "${BASH_IT?}/plugins/enabled/225----node.plugin.bash" ] assert [ ! -L "${BASH_IT?}/plugins/enabled/250----nvm.plugin.bash" ] - assert [ ! -L "${BASH_IT?}/aliases/enabled/250----todo.txt-cli.aliases.bash" ] + assert [ ! -L "${BASH_IT?}/aliases/enabled/250----todo.aliases.bash" ] } @test "helpers: run the migrate command without anything to migrate and nothing enabled" { From f93706e7d157723a818445a6e6b698b4e1e8db01 Mon Sep 17 00:00:00 2001 From: Shine Nelson <4771718+shinenelson@users.noreply.github.com> Date: Tue, 17 Jun 2025 13:51:09 +0530 Subject: [PATCH 4/4] fix missed test assertion --- test/lib/helpers.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index 1496ea0f21..1716a39f9c 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -95,8 +95,8 @@ function local_setup() { @test "helpers: enable the todo.txt-cli aliases through the bash-it function" { run bash-it enable alias "todo.txt-cli" - assert_line -n 0 'todo.txt-cli enabled with priority 150.' - assert_link_exist "${BASH_IT?}/enabled/150---todo.txt-cli.aliases.bash" + assert_line -n 0 'todo enabled with priority 150.' + assert_link_exist "${BASH_IT?}/enabled/150---todo.aliases.bash" } @test "helpers: enable the curl aliases" {