Skip to content

Commit eb5df80

Browse files
authored
Support tab completing when binary is in bin/ directory (#323)
1 parent db9eb78 commit eb5df80

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.3.4] - 2023-10-10
4+
5+
### Added
6+
7+
- Add support for tab completion to the `bash` shell when binary is in the `bin/` directory and referenced with `./` ([#323](https://github.com/athena-framework/athena/pull/323)) (George Dietrich)
8+
39
## [0.3.3] - 2023-10-09
410

511
### Changed
@@ -100,6 +106,7 @@ _First release a part of the monorepo._
100106

101107
_Initial release._
102108

109+
[0.3.4]: https://github.com/athena-framework/console/releases/tag/v0.3.4
103110
[0.3.3]: https://github.com/athena-framework/console/releases/tag/v0.3.3
104111
[0.3.2]: https://github.com/athena-framework/console/releases/tag/v0.3.2
105112
[0.3.1]: https://github.com/athena-framework/console/releases/tag/v0.3.1

shard.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: athena-console
22

3-
version: 0.3.3
3+
version: 0.3.4
44

55
crystal: ~> 1.8
66

src/athena-console.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ alias ACONA = ACON::Annotations
115115
# WARNING: The completion script may only be used with real built binaries, not temporary ones such as `crystal run src/console.cr -- completion`.
116116
# This is to ensure the performance of the script is sufficient, and to avoid any issues with the naming of the temporary binary.
117117
module Athena::Console
118-
VERSION = "0.3.3"
118+
VERSION = "0.3.4"
119119

120120
# Contains all the `Athena::Console` based annotations.
121121
module Annotations; end

src/commands/complete.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require "semantic_version"
33
@[Athena::Console::Annotations::AsCommand("|_complete", description: "Internal command to provide shell completion suggestions")]
44
# :nodoc:
55
class Athena::Console::Commands::Complete < Athena::Console::Command
6-
API_VERSION = 1
6+
API_VERSION = 2
77

88
@completion_outputs : Hash(String, ACON::Completion::Output::Interface.class)
99

src/completion/output/completion.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ _athena_<%= @command_name %>() {
8989
fi
9090
}
9191

92-
complete -F _athena_<%= @command_name %> <%= @command_name %> ./<%= @command_name %>
92+
complete -F _athena_<%= @command_name %> <%= @command_name %> ./<%= @command_name %> ./bin/<%= @command_name %>

0 commit comments

Comments
 (0)