Open mkanet opened 10 years ago
Hi,
Can you please provide an actual function you are trying to document? Also, this plugin works only for modules that are on your PSModulePath and only on the exported commands.
Maybe I'm not doing something right. From PS command prompt, I verified cmdlet functions are exported and available (see below). I also verified they are all part of modules that are loaded and included in PSModulePath. In fact, they're recognized by the ST3 Powershell package I have installed as valid cmdlets.
If I, for example, put my cursor on "new-fbphoto" (or any other cmdlet function listed below) in a poweshell script in ST3.. then click on "Document cmdlet" from list of commands, nothing happens. Maybe I'm not doing something right?
PS Z:\Desktop\dev> cd function:
PS Function:> ls
CommandType Name ModuleName
Function notes Function O: Function New-FBPhoto Facebook Function New-FBFeed Facebook Function New-FBFriendList Facebook . . Function Enter-PSRemote Function F: Function E: Function Clear-Host . .
Sorry for the delay. Please make sure your method signature matches below regular expression:
cmdletName = re.search('\sfunction\s([\w\d-]+)', line_contents).group(1)
Can you please provide your method signature? Maybe we need to update the regex
I installed the this package on the latest ST3. When I put my cusor on any cmdlet name and select, "Document cmdlet" from the list of commands, nothing at all happens. I tried it several times. If I look at the ST console window, it just shows:
File "C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\Powershell Help Generator\document.py", line 17, in run cmdletName = re.search('\sfunction\s([\w\d-]+)', line_contents).group(1) AttributeError: 'NoneType' object has no attribute 'group' Traceback (most recent call last): File "C:\Program Files\SublimeText\sublimeplugin.py", line 549, in run return self.run(edit) File "C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\Powershell Help Generator\document.py", line 17, in run cmdletName = re.search('\sfunction\s([\w\d-]+)', line_contents).group(1) AttributeError: 'NoneType' object has no attribute 'group' Traceback (most recent call last): File "C:\Program Files\SublimeText\sublimeplugin.py", line 549, in run return self.run(edit) File "C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\Powershell Help Generator\document.py", line 17, in run cmdletName = re.search('\sfunction\s([\w\d-]+)', line_contents).group(1) AttributeError: 'NoneType' object has no attribute 'group'