DonationCoder.com Software > N.A.N.Y. 2013
N.A.N.Y 2013 Submission - CommandPromptHere for FARR
ewemoa:
Thanks for the kind words, testing, and reporting back :)
ewemoa:
In the pipeline:
* PowerShell support
* Option to display menu items in submenu if there are two or more menu items
* Move the non-cmd.exe code to external files
I think the last change should make it easier (and safer) to support additional command prompts.
To add support for another command prompt, one would create an appropriate .js file in the lib subdirectory. The .js files in lib should get loaded when the plugin is initialized. The last thing each .js file needs to do is evaluate to an appropriate function value. The function should take one argument (representing the full-path of the currently selected item in FARR) and build an appropriate menu item string.
Update: What is below is obsolete -- the current mechanism is a bit different. See source or please ask for details :)
Below is what I currently have for lib\PowerShell.js:
--- Code: Javascript ---(function () { return function (path) { var launchstr, menuitemstr, cpname, psmodulepath, psexepath; cpname = "PowerShell"; // menuitemstr = ""; psmodulepath = FARR.getStrValue("resolve:%PSModulePath%"); if (psmodulepath !== "") { psexepath = psmodulepath.replace("Modules\\", "powershell.exe"); if (!pu.fso.FileExists(psexepath)) { return ""; } /* thanks to: http://brianreiter.org/2010/08/11/ \ command-prompt-and-powershell-here-with-console-exe/ */ launchstr = psexepath + " -NoExit" + " -Command Set-Location" + " -LiteralPath " + "'" + path + "\\" + "'"; // extra backslash for drive menuitemstr = buildMenuItemString({caption: prepareCaptionText(cpname), hint: prepareHintText(cpname, path), icon: psexepath, launch: launchstr}); } return menuitemstr; };} ());
ewemoa:
New version uploaded as the only current release -- initial post updated to reflect changes.
In addition to changes mentioned before, there is now support for Cygwin's Zsh (if installed) and NYAOS3.
ewemoa:
Added support for msysGit's Bash.
See the first post for a link to an archive.
To install:
1. Unzip the archive's content (2 files) to the plugin's lib subfolder.
2. Create an appropriate FARR User Variable like:
--- ---[CommandPromptHere]
msysGit = C:\apps\msysgit
Note that the path is to where msysGit is installed -- not the path of Bash.
3. Restart FARR (or use either of the rplugins or goreload FARR commands).
Update: Comes bundled now.
ewemoa:
For fun, have implemented something like Firefox's about:config:
1. Enumerating variables:
N.A.N.Y 2013 Submission - CommandPromptHere for FARR
2. Filtering candidates:
N.A.N.Y 2013 Submission - CommandPromptHere for FARR
3. Editing a value:
N.A.N.Y 2013 Submission - CommandPromptHere for FARR
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version