Skip to content

Conversation

seefood
Copy link
Contributor

@seefood seefood commented Oct 7, 2025

Summary

Renames aliases/available/todo.txt-cli.aliases.bash to aliases/available/todo.aliases.bash to fix interactive install failure.

Problem

The interactive install script fails to recognize the todo alias file because of incorrect naming:

Issue screenshot from #2314

The install script's _bash-it-install-enable() function (install.sh:26) parses filenames using:

just_the_name="${file_name%".${file_type}.bash"}"

Expected pattern: {name}.aliases.bash → extracts {name}

Previous name: todo.txt-cli.aliases.bash → extracts todo.txt-cli
New name: todo.aliases.bash → extracts todo

Solution

Simple file rename to match the naming convention already used by:

  • todo.plugin.bash
  • todo.completion.bash

Testing

Verified that install script parsing now works correctly:

$ file_type="aliases"
$ file_name="todo.aliases.bash"
$ just_the_name="${file_name%".${file_type}.bash"}"
$ echo "$just_the_name"
todo

Notes

  • File content unchanged - already uses $TODO variable correctly
  • These are thin wrapper aliases for the external todo.txt-cli tool
  • Users install todo.txt-cli separately: brew install todo-txt
  • Official upstream: https://github.com/todotxt/todo.txt-cli
  • No vendoring needed - bash-it only provides convenience aliases

Related Issues

🤖 Generated with Claude Code

Renames `aliases/available/todo.txt-cli.aliases.bash` to
`aliases/available/todo.aliases.bash` to match the naming convention
expected by the interactive install script.

**Problem:**
The install script in `_bash-it-install-enable()` (install.sh:26) parses
alias filenames using the pattern:
```bash
just_the_name="${file_name%".${file_type}.bash"}"
```

This expects: `{name}.aliases.bash` → extracts `{name}`

But the file was named `todo.txt-cli.aliases.bash`, which when stripped
of `.aliases.bash` leaves `todo.txt-cli`, causing the install script
to fail to recognize it during interactive installation.

**Solution:**
Rename to `todo.aliases.bash` to match the convention used by:
- `todo.plugin.bash` ✅
- `todo.completion.bash` ✅

Now extracts correctly: `todo.aliases.bash` → `todo`

**Notes:**
- File content unchanged - already uses `$TODO` variable correctly
- These are thin wrappers for the external todo.txt-cli tool
- Users install todo.txt-cli separately: `brew install todo-txt`
- Official upstream: https://github.com/todotxt/todo.txt-cli

**Related Issues:**
- Fixes Bash-it#2314 (interactive install failure)
- Related to Bash-it#1693, Bash-it#1742, Bash-it#2005 (todo plugin cleanup history)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@seefood
Copy link
Contributor Author

seefood commented Oct 7, 2025

Closing as duplicate of #2321 which includes the same rename plus proper test updates. PR #2321 is more complete and was created first.

@seefood seefood closed this Oct 7, 2025
@seefood seefood deleted the fix/todo-alias-naming branch October 12, 2025 12:43
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

Successfully merging this pull request may close these issues.

[Bug]: interative install fails to install todo aliases

1 participant