Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 0.0.1
publish_to: none

environment:
sdk: ^3.8.1
sdk: ^3.12.0

dependencies:
args: ^2.5.0
Expand Down
12 changes: 6 additions & 6 deletions lib/src/installer/shell_completion_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class ShellCompletionConfiguration {
final zshConfiguration = ShellCompletionConfiguration._(
shell: SystemShell.zsh,
shellRCFiles: const ['~/.zshrc'],
sourceLineTemplate: (String scriptPath) {
sourceLineTemplate: (scriptPath) {
return '[[ -f $scriptPath ]] && . $scriptPath || true';
},
scriptTemplate: (String rootCommand) {
scriptTemplate: (rootCommand) {
// Completion script for zsh.
//
// Based on https://github.com/mklabs/tabtab/blob/master/lib/scripts/zsh.sh
Expand All @@ -80,13 +80,13 @@ if type compdef &>/dev/null; then

IFS=\$'\n' reply=(\$(COMP_CWORD="\$((CURRENT-1))" COMP_LINE="\$BUFFER" COMP_POINT="\$CURSOR" $rootCommand completion -- "\${words[@]}"))
IFS=\$si

zstyle ':completion:*' menu yes select
zstyle ':completion:*' list-colors ''

if [[ -z "\$reply" ]]; then
_path_files
else
else
_describe 'values' reply
fi
}
Expand All @@ -101,10 +101,10 @@ fi
final bashConfiguration = ShellCompletionConfiguration._(
shell: SystemShell.bash,
shellRCFiles: const ['~/.bashrc', '~/.bash_profile'],
sourceLineTemplate: (String scriptPath) {
sourceLineTemplate: (scriptPath) {
return '[ -f $scriptPath ] && . $scriptPath || true';
},
scriptTemplate: (String rootCommand) {
scriptTemplate: (rootCommand) {
// Completion script for bash.
//
// Based on https://github.com/mklabs/tabtab/blob/master/lib/scripts/bash.sh
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ screenshots:
path: doc/screen.png

environment:
sdk: ^3.8.1
sdk: ^3.12.0

dependencies:
args: ^2.5.0
Expand Down
4 changes: 2 additions & 2 deletions test/src/installer/shell_completion_configuration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ if type compdef &>/dev/null; then

IFS=\$'\n' reply=(\$(COMP_CWORD="\$((CURRENT-1))" COMP_LINE="\$BUFFER" COMP_POINT="\$CURSOR" very_good completion -- "\${words[@]}"))
IFS=\$si

zstyle ':completion:*' menu yes select
zstyle ':completion:*' list-colors ''

if [[ -z "\$reply" ]]; then
_path_files
else
else
_describe 'values' reply
fi
}
Expand Down