allow shell plugin to affect remote module filename

Fix for 13368, added get_remote_filename to shell plugins, powershell version appends .ps1 if necessary, base shell plugin no-ops
This commit is contained in:
nitzmahone 2015-12-01 13:39:02 -08:00
parent f873cc0fb5
commit c94509f273
4 changed files with 13 additions and 6 deletions

View file

@ -47,6 +47,10 @@ class ShellModule(object):
def join_path(self, *args):
return os.path.join(*args)
# some shells (eg, powershell) are snooty about filenames/extensions, this lets the shell plugin have a say
def get_remote_filename(self, base_name):
return base_name.strip()
def path_has_trailing_slash(self, path):
return path.endswith('/')