@@ -162,22 +162,21 @@ def subcommand_load(args):
162
162
print (output )
163
163
164
164
elif args .config :
165
- if '.' in args .config :
166
- args .config .remove ('.' )
165
+ if '.' == args .config :
167
166
if config .in_cwd ():
168
167
args .config .append (config .in_cwd ()[0 ])
169
168
else :
170
169
print ('No tmuxp configs found in current directory.' )
171
170
172
- for configfile in args .config :
173
- file_user = os .path .join (config_dir , configfile )
174
- file_cwd = os .path .join (cwd_dir , configfile )
175
- if os .path .exists (file_cwd ) and os .path .isfile (file_cwd ):
176
- build_workspace (file_cwd , args )
177
- elif os .path .exists (file_user ) and os .path .isfile (file_user ):
178
- build_workspace (file_user , args )
179
- else :
180
- logger .error ('%s not found.' % configfile )
171
+ configfile = args .config
172
+ file_user = os .path .join (config_dir , configfile )
173
+ file_cwd = os .path .join (cwd_dir , configfile )
174
+ if os .path .exists (file_cwd ) and os .path .isfile (file_cwd ):
175
+ build_workspace (file_cwd , args )
176
+ elif os .path .exists (file_user ) and os .path .isfile (file_user ):
177
+ build_workspace (file_user , args )
178
+ else :
179
+ logger .error ('%s not found.' % configfile )
181
180
182
181
183
182
def subcommand_import_teamocil (args ):
@@ -587,6 +586,14 @@ def config_complete(command, commands, ctext):
587
586
ctext_subargs = ctext .replace (command + ' ' , '' )
588
587
configs = []
589
588
589
+ # if ctext_subargs.startswith('.') or ctext_subargs.startswith('/'):
590
+ # configs += ['.hi']
591
+
592
+ # if ctext_subargs.endswith('/') and ctext_subargs != './':
593
+ # configs += ['./' + c for c in config.in_dir(os.path.relpath(ctext_subargs))]
594
+ # else:
595
+ # configs += os.listdir(os.path.relpath(ctext_subargs))
596
+
590
597
configs += ['./' + c for c in config .in_dir (cwd_dir )]
591
598
configs += ['./' + c for c in config .in_cwd ()]
592
599
configs += [os .path .join (config_dir , c )
0 commit comments