Announcement

Collapse
No announcement yet.

Feature Request: Multiple

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

  • dickdunbar
    replied
    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

    Leave a comment:


  • Zoë
    replied
    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.

    Leave a comment:


  • Aaron
    replied
    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

    Leave a comment:


  • dickdunbar
    replied
    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.

    Leave a comment:


  • dickdunbar
    replied
    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.

    Leave a comment:


  • dickdunbar
    replied
    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?

    Leave a comment:


  • dickdunbar
    replied
    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.

    Leave a comment:


  • dickdunbar
    replied
    Originally posted by Aaron View Post
    Could you give a specific example of what you mean by "Expanded in place"?
    This is how gzip behaves; these are regular files, not archives.

    $ gzip -v *log1
    session01a.log1: 92.6% -- replaced with session01a.log1.gz

    $ ls -l *log1*
    -rwxrwxrwx 1 ddunbar None 3695 2010-02-20 04:35 session01a.log1.gz

    $ gzip -dv *log1.gz
    session01a.log1.gz: 92.6% -- replaced with session01a.log1

    $ ls -l *log1*
    -rwxrwxrwx 1 ddunbar None 49761 2010-02-20 04:35 session01a.log1

    Leave a comment:


  • Aaron
    replied
    Open With can be set to accept Folders and not Files, and disable Multiple Instances. The %p argument is the absolute path without the filename.

    We have an example Open With KB article here:
    http://www.scootersoftware.com/suppo...kb_openwithapp

    If you need to call the .bat file, you can pass %p after the .bat:
    Command Line: C:\Program Files\Beyond Compare 3\BatFiles\Bash.bat %p
    Then reference it inside of the bat file as %1
    If you run into any odd syntax errors, you may need quotes around arguments to help handle spaces.

    Let us know if you have any questions.

    Leave a comment:


  • Aaron
    replied
    Hello,

    Could you give a specific example of what you mean by "Expanded in place"?

    If you have a base folder, C:\Temp\, with a Archive.7z file, you can double click that file and see the specific files inside. Selecting them and using the Copy To Folder command will let you select any destination (C:\Temp, C:\Temp\Archive\ creating a new folder, or even C:\Temp\Archive.zip creating a new zip file).

    If your files are not treated as archives, you can add them to the .7z or .zip lists in the Tools menu -> Options; Folder Views

    Leave a comment:


  • dickdunbar
    replied
    Originally posted by Aaron View Post
    #5. Do you know the specific command line call you could use for BASH? If you can, use our Open With to call it from the command line to open it? Open With can call a .bat file if multiple steps are necessary.
    I've been whacking away at this for awhile.

    Does "Open With" take a directory as an argument?
    Any examples of how one does that?

    I've also tried to get directories recognized in my 7zip implementation,
    without success.

    BC3 is so intuitively obvious, that I don't think I've ever read the help
    file through completely. (I will this week).

    This is what "out of the box" cygwin.bat looks like.
    It puts you into your home directory.

    @echo off
    C:
    chdir C:\cygwin\bin
    bash --login -i



    And this is "bash-here.reg" entry, used to R-click a folder in Explorer,
    and drop into bash at that location.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Drive\shell\BashHere]
    @="&Bash here"


    [HKEY_CLASSES_ROOT\Drive\shell\BashHere\command]
    @="C:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""


    [HKEY_CLASSES_ROOT\Directory\shell\BashHere]
    @="Bash here"


    [HKEY_CLASSES_ROOT\Directory\shell\BashHere\command]
    @="C:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""
    Last edited by dickdunbar; 23-Feb-2010, 11:19 AM.

    Leave a comment:


  • dickdunbar
    replied
    You have support for archives, which behave the way you describe.

    These are individual files that I need expanded (in place).
    My 7Zip commands don't do what I want exactly ... gzip -d ... will expand
    a file, and get rid of the zipped version.

    My 7zip command expands (just not where I want it), and leaves both files
    in the directory.

    Originally posted by Aaron View Post
    #6 We have 7zip support in BC3 by default. We can open and expand them like folders. You could then use the Copy To Folder command on the files inside to extract/copy them to another location.

    Leave a comment:


  • dickdunbar
    replied
    Exactly, Aaron ... I thought I saw it before, just couldn't remember how
    to do it. (I won't forget this time ... I use it all the time).

    Originally posted by Aaron View Post
    For #7, You can right click a folder in the Home screen and it will open all of the child sessions inside that folder in new tabs. Is that the behavior you are looking for?
    Last edited by dickdunbar; 22-Feb-2010, 10:20 PM.

    Leave a comment:


  • Aaron
    replied
    #1. I have added to our Customer Wishlist. Thanks for the suggestion.

    #2. Is the problem that folders are collapsing again when you do not want them to? This happens due to refreshing, loading a different folder, or other conditions in the application. Which action or Command in Beyond Compare are you doing that is causing the folders to collapse?

    #3. I have added this to our Customer Wishlist.

    #4. Could you go into more detail on this request? I am having difficulty understanding your specific example. Perhaps a mock-up or picture may help? Are you looking for Duplicate finding, or aligning one file to many files? How are you using this with a specific example?

    Leave a comment:


  • Aaron
    replied
    Sorry for the problem in posting. vBulletin has a few quirks here and there. Hitting back will sometimes allow you to get back the forum text box populated, but I've lost a couple of posts that way myself. Whenever I type in a particularly long post, I will copy it to my clipboard quick just in case something funny happens during the Post.

    Leave a comment:

Working...
X