mirror of
https://github.com/debauchee/barrier.git
synced 2025-08-01 23:59:38 +02:00
Modified ftp upload behaviour
This commit is contained in:
parent
3d21f93dd3
commit
e93c892459
3 changed files with 57 additions and 25 deletions
12
hm.py
12
hm.py
|
@ -52,7 +52,8 @@ cmd_opt_dict = {
|
|||
'update' : ['', []],
|
||||
'install' : ['', []],
|
||||
'doxygen' : ['', []],
|
||||
'dist' : ['', ['ftp-host=', 'ftp-user=', 'ftp-pass=', 'ftp-dir=']],
|
||||
'dist' : ['', []],
|
||||
'distftp' : ['', ['host=', 'user=', 'pass=', 'dir=']],
|
||||
'kill' : ['', []],
|
||||
'usage' : ['', []],
|
||||
'revision' : ['', []],
|
||||
|
@ -74,10 +75,19 @@ def complete_command(arg):
|
|||
completions = []
|
||||
|
||||
for cmd, optarg in cmd_opt_dict.iteritems():
|
||||
# if command was matched fully, return only this, so that
|
||||
# if `dist` is typed, it will return only `dist` and not
|
||||
# `dist` and `distftp` for example.
|
||||
if cmd == arg:
|
||||
return [cmd,]
|
||||
if cmd.startswith(arg):
|
||||
completions.append(cmd)
|
||||
|
||||
for alias, cmd in cmd_alias_dict.iteritems():
|
||||
# don't know if this will work just like above, but it's
|
||||
# probably worth adding.
|
||||
if alias == arg:
|
||||
return [alias,]
|
||||
if alias.startswith(arg):
|
||||
completions.append(alias)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue