Announcement

Collapse
No announcement yet.

Feature Request: Multiple

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I use another tool (zgrep) to deal with compressed files:


    export GREP=/usr/bin/egrep
    zgrep . 'swap'


    zgrep man page:


    zgrep - search possibly compressed files for a regular expression

    zgrep [ grep_options ] [ -e ] pattern filename...

    zgrep invokes grep on compressed or gzipped files. All options specified are passed directly to grep.

    If no file is specified, then the standard input is compressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.

    If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.

    Comment


    • #17
      With all the pieces of the "bash_here" puzzle now displayed, here's my next attempt:

      Tools / Options / Open With / [ New ... ]

      Description: bash-here
      Shortcut: Ctrl+F
      Command line: C:\cygwin\bin\bash.exe --login -rcfile ~/.bashrc
      Working folder: %p
      [x] Accepts folders

      Press Ctrl-F on a highlighted folder
      Right-Click on a folder, Open With / "bash-here"

      Nothing happens. How do I debug this?

      Comment


      • #18
        I also modified my 7-zip Open With:

        Working folder: <base folder>
        Working folder: %p

        The first one uncompresses into the base (aka parent?) folder.
        The second one does nothing at all.

        Comment


        • #19
          Originally posted by Aaron View Post
          We have an example Open With KB article here:
          http://www.scootersoftware.com/suppo...kb_openwithapp

          Let us know if you have any questions.
          I have questions, yes. I think this article needs to be expanded.
          I've been playing with this, and not getting very far.

          Arguments to a bat file are not being received.
          I'm probably doing something wrong.

          ---
          In particular, the %P option described in the Help file (relative to working folder),
          does not seem to be working.
          ---
          This form of command does not set any %1 variables in the batch file.

          cmd /c start "" "C:\cygwin\CygwinBC3.bat" " %p %P %F"

          This form of command gets an error from cmd:

          cmd /c start "" "C:\cygwin\CygwinBC3.bat %p %P %F"

          "Windows cannot find 'C:\cygwin\CygwinBC3.bat C:\myfolder Done"

          As you can see, I'm passing multiple % vars from BC3, in order to figure out what I am getting.
          Answer: Nothing useful inside the .bat file.
          Last edited by dickdunbar; 23-Feb-2010, 01:16 PM.

          Comment


          • #20
            Hello Dick,

            Try this open with
            Code:
            bash.exe --login -c "cd '%f' ; exec /bin/bash -rcfile ~/.bashrc"
            In addition, you need to add c:\cygwin\bin to your Path.
            http://thehacklist.blogspot.com/2009...not-found.html
            This way, in any directory you can simply type "bash" in the command line, and it should work.
            Last edited by Aaron; 26-Feb-2010, 04:54 PM. Reason: Updated with Path information
            Aaron P Scooter Software

            Comment


            • #21
              Dick,

              For in-place extraction using 7-zip, use this:

              Command line: "C:\Program Files\Beyond Compare 3\7z.bat" "%n"
              Working folder: <parent folder>
              [x] Accepts files
              [ ] Accepts folders
              [x] Refresh when finished

              And in C:\Program Files\Beyond Compare 3\7z.bat put this:
              Code:
              "C:\Program Files\7-zip\7z.exe" x %1 -y
              if ERRORLEVEL 1 goto exit
                del /F %1
              :exit
              That will do the extraction and then delete the original archive if the extract was successful.

              Edit: Oh, this does set both "Overwrite all" on 7-zip and "Forcibly delete read-only" for the delete command, so if that's not intended remove the -y and /F.
              Zoë P Scooter Software

              Comment


              • #22
                Originally posted by Aaron View Post
                Try this open with
                Code:
                 bash.exe --login -c "cd '%f' ; exec /bin/bash -rcfile ~/.bashrc"
                Thanks, Aaron: works great. Win7 implementation steps:

                1. R-Click "Computer" / "Properties" / "Advanced System Settings"
                2. "Environment Variables" / "System Variables" / "Path" / "Edit"
                Append to end of path
                Code:
                ;c:\cygwin\bin
                Click "New"
                Variable: CYGWIN_HOME
                Value: C:\cygwin

                3. Beyond Compare / Tools / Options / Open With / "New"

                Description: "bash Here"
                Command Line: See Araron's line above
                ShortCut: Ctrl-H
                [x] Accepts Files [x] Accepts Folders

                --- Without [x] Accepts files, R-Click on a Path does not display the OpenWith dialog submenu.
                The shortcut works fine (Ctrl-H), and now the dialog is displayed when I forget the shortcut.
                Last edited by dickdunbar; 29-Jun-2010, 03:32 PM. Reason: [x] Accepts files ... must be checked to see OpenWith submenu

                Comment

                Working...
                X