Skip to content

Commit

Permalink
Support tab completing when binary is in bin/ directory (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blacksmoke16 authored Oct 10, 2023
1 parent db9eb78 commit eb5df80
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [0.3.4] - 2023-10-10

### Added

- 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)

## [0.3.3] - 2023-10-09

### Changed
Expand Down Expand Up @@ -100,6 +106,7 @@ _First release a part of the monorepo._

_Initial release._

[0.3.4]: https://github.com/athena-framework/console/releases/tag/v0.3.4
[0.3.3]: https://github.com/athena-framework/console/releases/tag/v0.3.3
[0.3.2]: https://github.com/athena-framework/console/releases/tag/v0.3.2
[0.3.1]: https://github.com/athena-framework/console/releases/tag/v0.3.1
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: athena-console

version: 0.3.3
version: 0.3.4

crystal: ~> 1.8

Expand Down
2 changes: 1 addition & 1 deletion src/athena-console.cr
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ alias ACONA = ACON::Annotations
# WARNING: The completion script may only be used with real built binaries, not temporary ones such as `crystal run src/console.cr -- completion`.
# This is to ensure the performance of the script is sufficient, and to avoid any issues with the naming of the temporary binary.
module Athena::Console
VERSION = "0.3.3"
VERSION = "0.3.4"

# Contains all the `Athena::Console` based annotations.
module Annotations; end
Expand Down
2 changes: 1 addition & 1 deletion src/commands/complete.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require "semantic_version"
@[Athena::Console::Annotations::AsCommand("|_complete", description: "Internal command to provide shell completion suggestions")]
# :nodoc:
class Athena::Console::Commands::Complete < Athena::Console::Command
API_VERSION = 1
API_VERSION = 2

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

Expand Down
2 changes: 1 addition & 1 deletion src/completion/output/completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ _athena_<%= @command_name %>() {
fi
}

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

0 comments on commit eb5df80

Please sign in to comment.