File tree 1 file changed +15
-4
lines changed
1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -112,10 +112,15 @@ def create_import_subparser(
112
112
)
113
113
114
114
try :
115
- import shtab
115
+ import argcomplete
116
+ import argcomplete .completers
116
117
117
- teamocil_config_file .complete = shtab .FILE # type: ignore
118
- tmuxinator_config_file .complete = shtab .FILE # type: ignore
118
+ teamocil_config_file .completer = ( # type: ignore
119
+ argcomplete .completers .FilesCompleter ()
120
+ )
121
+ tmuxinator_config_file .completer = ( # type:ignore
122
+ argcomplete .completers .FilesCompleter ()
123
+ )
119
124
except ImportError :
120
125
pass
121
126
@@ -186,7 +191,7 @@ def command_import_tmuxinator(
186
191
def create_convert_subparser (
187
192
parser : argparse .ArgumentParser ,
188
193
) -> argparse .ArgumentParser :
189
- parser .add_argument (
194
+ config_file = parser .add_argument (
190
195
dest = "config_file" ,
191
196
type = str ,
192
197
help = "checks current ~/.teamocil and current directory for yaml files" ,
@@ -198,6 +203,12 @@ def create_convert_subparser(
198
203
action = "store_true" ,
199
204
help = "always answer yes" ,
200
205
)
206
+ try :
207
+ from tmuxp .cli .completions import ConfigFileCompleter
208
+
209
+ config_file .completer = ConfigFileCompleter # type:ignore
210
+ except ImportError :
211
+ pass
201
212
return parser
202
213
203
214
You can’t perform that action at this time.
0 commit comments