Skip to content

Commit

Permalink
Fix shell completion for commands with dashes in their name (ajalt#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
stellingsimon committed Dec 14, 2019
1 parent 15c7707 commit 0ab59c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Fixed
- Shell completion can now handle command names with dashes. ([#104](/~https://github.com/ajalt/clikt/issues/104))

## [2.3.0] - 2019-11-07
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ internal object CompletionGenerator {
for (name in subcommands) {
append("""
| $name)
| ${funcName}_$name ${'$'}(( i + 1 ))
| ${funcName}_${name.replace('-', '_')} ${'$'}(( i + 1 ))
| return
| ;;
|
Expand Down

0 comments on commit 0ab59c0

Please sign in to comment.