How do you launch from within "Finder" a file to open in nano?

So i want to be able to click on a file found in Finder and have it open in /user/bin/nano

I tried creating an Automator Service to open it using applescript, but it won't run from the contextual menu. It works if I run it in the automator window, but doesn't seem to run at all from the Services menu.
Create an Automator Service that receives files and folders in Finder.
Add an Applescript Action. Put this in for the code:
on run {input, parameters}
          repeat with anItem in input
                    tell application "Terminal"
  activate
                              do script with command "nano " & quoted form of POSIX path of anItem
                    end tell
          end repeat
end run
Save it and it should appear in the contextual menu in the Finder.  If it doesn't, select it from the Services menu. For some reason, it sometimes doesn't appear until you run it once.
The next thing I tried was just creating an Applescript Droplet. Essentially the same code, but you create it in Applescript Editor and save it as an application (also save a script copy, first).
You can then drag the file onto the Droplet and it will open the file in nano.  If you put it in the Dock, you can drop the file there.
on open somefiles
          repeat with anItem in somefiles
                    tell application "Terminal"
  activate
                              do script with command "nano " & quoted form of POSIX path of anItem
                    end tell
          end repeat
end open

Similar Messages

  • Using RMAN, how do you restore from an old backup file?

    HI,
    I use Oracle 9i on Solaris.
    I'm currently doing incremental level 0 hot backups every night using RMAN in NOCATALOG mode. The controlfile is backed up with the database. I back it up to a file (e.g. "level0_20041225.dmp"). After I back it up, it's backed up to tape using Veritas. Before doing a backup, I delete the old one first.
    I need to restore a copy of the database backup that was taken a month ago. This file is on tape. How do I go about it using RMAN? The documentation is not too clear as it talks more about Restoring the control file and the latest copy of the database.
    How do you restore an old copy of the database from a database file?
    Pls advise
    Thanks

    You can recover to the last committed transaction,
    provided you have the current controlfile, archived
    logs since the backup and the current online logs.
    Here's the procedure in a nutshell:
    a) Restore datafiles from tape.
    b) Recover database using restored files + current
    controlfiles and archived/online logs. RMAN will prompt
    you for the logs it needs for recovery.
    You can also perform this type of recovery using a
    backup controlfile. In this case you would still need
    all logs as above. After recovery, you would have to
    open the database with RESETLOGS because you are using
    a backup controlfile.
    If you don't want/need to recover up to the last
    committed transaction, you use a backup controlfile and
    perform incomplete recovery (time or change based). This
    simply means that you stop the application of redo at
    the time or SCN of your choice.
    Most of the scenarios of interest are documented in
    the following book:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96566/toc.htm
    Hope this helps.
    Kailash.

  • How do you launch an app from a shell?

    how do you launch an app from a shell?  how about an example... say, launch the texteditor app.

    To open an app from the terminal use the command open followed by the fullpath pf the command.
    So for TextEdit you would enter
    open /Applications/TextEdit.app

  • How do you launch apps on your device when it keeps saying my device was not known any advice?

    How do you launch apps from your device mine being a Macbook pro?

    Hi TammyPruett,
    I apologize, I'm a bit unclear on the exact issue you are describing. If you are having issues launching applications on your Mac, you may find the following articles helpful:
    Mac OS X: How to troubleshoot a software issue
    http://support.apple.com/kb/ht1199
    Apple Support: Troubleshooting the Mac App Store
    http://support.apple.com/kb/ts3624
    Regards,
    - Brenden

  • How do you delete folders within collections in mini bridge?

    How do you delete folders within collections in mini bridge?

    his chapter on Mini Bridge where he talks about organizing your photos getting rid of some and making a folder or file sorry not certain of the terminology under Collections in mini bridge to acess your "keepers" perse.
    Not familiar with this book but if Scott is talking about using mini bridge for sorting images he is way out of line. Mini Bridge (to my opinion next to useless since they screwed it up for CS6 but that is another discussion) should be seen as a shortcut to Bridge itself when working in Photoshop on complex tasks of image or album compilation and prevent you from switching back and forward between the two applications while working on a project.
    Unfortunately some people thought that it might be useful to add more functions to it and now users start believing they don't need bridge itself for this.
    Please use Bridge itself for sorting etc and also try to get hold of a copy of 'Real World Camera Raw' written by Bruce Fraser and Jeff Schewe. They have an edition for about all CS versions and this book will let you know how to really use the power of Bridge and Adobe Camera Raw

  • How can you upgrade from OS 10.4

    How can you upgrade from MAC 10.4.4

    Backup your computer.
    Buy Snow Leopard.
    Boot from Snow Leopard DVD.
    Erase the hard drive.
    Install Snow Leopard.
    To get Snow Leopard:
    Upgrading to Snow Leopard
    You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mountain Lion if your computer meets the requirements.
         Snow Leopard General Requirements
           1. Mac computer with an Intel processor
           2. 1GB of memory
           3. 5GB of available disk space
           4. DVD drive for installation
           5. Some features require a compatible Internet service provider;
               fees may apply.
           6. Some features require Apple’s iCloud services; fees and
               terms apply.
    To upgrade further see:
    Upgrading from Snow Leopard to Lion or Mountain Lion to Mavericks
    To upgrade to Mavericks you must have Snow Leopard 10.6.8, Lion, or Mountain Lion installed. Purchase and download Mavericks (Free) from the App Store. Sign in using your Apple ID. The file is quite large, over 5 GBs, so allow some time to download. It would be preferable to use Ethernet because it is nearly four times faster than wireless.
         OS X Mavericks- System Requirements
           Macs that can be upgraded to OS X Mavericks
             1. iMac (Mid 2007 or newer) — Model Identifier 7,1 or later
             2. MacBook (Late 2008 Aluminum, or Early 2009 or newer) —
                 Model Identifier 5,1 or later
             3. MacBook Pro (Mid/Late 2007 or newer) — Model Identifier 3,1 or later
             4. MacBook Air (Late 2008 or newer) — Model Identifier 2,1 or later
             5. Mac mini (Early 2009 or newer) — Model Identifier 3,1 or later
             6. Mac Pro (Early 2008 or newer) — Model Identifier 3,1 or later
             7. Xserve (Early 2009) — Model Identifier 3,1 or later
    To find the model identifier open System Profiler in the Utilities folder. It's displayed in the panel on the right.
    Are my applications compatible?
             See App Compatibility Table — RoaringApps.
    Upgrading to Lion
    If your computer does not meet the requirements to install Mavericks, it may still meet the requirements to install Lion.
    You can purchase Lion by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
         Lion System Requirements
           1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
               or Xeon processor
           2. 2GB of memory
           3. OS X v10.6.6 or later (v10.6.8 recommended)
           4. 7GB of available space
           5. Some features require an Apple ID; terms apply.

  • In LiveCycle Designer ES4 how do you remove tabs within a page once they have been created?

    In LiveCycle Designer ES4 how do you remove tabs within a page once they have been created?

    Emma,
    Take a look at the troubleshooting tips on this page from the Infosemantics website:
    http://www.infosemantics.com.au/adobe-captivate-widgets/drag-and-drop/troubleshooting-widg et-issues
    Pay particular attention to the section entitled: "My drag and drop question works correctly sometimes, but not other times. "
    From the appearance of your slide, it looks like you may have removed some of the components from the quiz slide that are necessary for it to function correctly.  Try the test that this section of the troubleshooting suggests so that you can see if this is the case.  If it turns out that you have deleted some items, you'll need to recreate your quiz slide to get them back again.
    Hope this helps.

  • In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    Sorry, I tried to say your answer solved my question, but I guess I told it that my response to you solved it. Now that I liked it, the solved option doesn't appear.

  • How do you switch from one iTunes account to another on your apple tv?

    How do you switch from one iTunes account to another on your apple tv?

    Welcome to the Apple community.
    I assume you do mean a different account and not simply a different iTunes library. Unfortunately, in order to switch accounts, you would need to log out and log in to the second account.

  • How do you upgrade from Mac OS x 10.6.8 to Lion?

    How do you upgrade from Mac OS x 10.6.8 to Lion?

    First check to be sure your hardware meets the hardware requirements for Lion.
    Backup your data. I suggest a bootable clone as the way to go.
    Then open App Store and purchase and download the Lion installer.
    Then install Lion.
    Allan

  • How do you stream from my mac to apple tv

    How do you stream from my MacBook Pro to my apple tv?  I want to watch a show that is on the internet.

    Welcome to Apple Support Communities
    See > http://support.apple.com/kb/HT5404 If your computer is compatible with AirPlay Mirroring, you can use it to mirror the computer screen to your Apple TV.
    If your Mac isn't compatible with AirPlay Mirroring, you can use a third-party app, like AirParrot > http://www.airparrot.com

  • HT4211 How do you switch from multitasking mode back to normal display mode?

    How do you switch from multitasking mode back to normal display mode?

    You mean switch from showing the recently used apps bar or dock back to regular home screen display mode?
    If so, select the Home button.

  • HT1551 How do you mirror from an iPod to 3rd generation apple tv

    How do you mirror from an ipod to 3rd generation apple tv

    Welcome to the Apple Support Communities
    You can only use AirPlay Mirroring if you have a 5th generation iPod touch > http://support.apple.com/kb/HT5209
    If you are referring to AirPlay > http://support.apple.com/kb/HT4437

  • How do you iMessage from the MacBook Pro

    How do you iMessage from the MacBook Pro?

    Lord Of The Weirdos wrote:
    And if you don't use that computer often be prepared for the mountains of new notifications the next time you run it.  Especially if your like me and use your iPhone and iPad a lot for texting people.  Wish iMessage in ML would know what you read somewhere else like iPad and iPhone does
    I don't quite understand what you are saying? If i recieve and read an iMessage on the iPhone and then switch on my Mac, I don't get a notification about a new message, but that iMessage appears on the conversation.

  • How do you reposition photos within an event

    How do you reposition photos within an event? I've tried dragging them over to the spot I want them in, but they do not stay where I put them. Yet, when I want to reposition photos within albums I have made, they drag over without a problem.

    cynthiafromfreehold wrote:
    How do you reposition photos within an event? I've tried dragging them over to the spot I want them in, but they do not stay where I put them. Yet, when I want to reposition photos within albums I have made, they drag over without a problem.
    That is correct - events are basic and time based and photos can not be manually moved within them - albums are logical grouping and photos can be moved manually - that is exactly how it works
    LN

Maybe you are looking for