Winmerge ignores file filters when showing "Left Unique Items"? - winmerge

In WinMerge (2.14.0.0) I've chosen to use a filter. This filter contains:
name: Test
desc: Test
def: include
d: \\www\\orders$
I'm comparing "D:\TEST\www\" with "D:\www\".
This directory exists: D:\www\orders\xyz\
This directory does not exist: D:\TEST\www\orders\
I have View > "Show Right Unique Items" checked. When I compare the directories the result, in part, shows:
"Right only: D:\www\orders" in the Comparison Result column.
But should it not be ignoring directory "www\orders"? Where have I gone wrong?

Ooops, think I've got the answer. It seems that the filter path must start inside the directory being compared.
So if comparing d:\www and you want to ignore d:\www\orders, the filter must only be:
d: \\orders$
And not: d: \www\orders$

Related

clang:how can fdebug-prefix-map use new path relative to user home path `~`?

I try rewrite the source file path to ~/src/lib by using fdebug-prefix-map.
I can confirm DW_AT_decl_file is rewritten to something like ~/src/lib/path.
But the result is lldb can't find the source file. If I change to a absolute path, it works fine.
How can I solve this?
You can use the target.source-map setting to remap location of source files. From (lldb) apropos source-map:
Source path remappings are used to track the change of location between a source file when built, and where it exists on the current system. It consists of an array of duples, the first element of each duple is some part (starting at the root) of the path to the file when it was built, and the second is where the remainder of the original build hierarchy is rooted on the local system. Each element of the array is checked in order and the first one that results in a match wins.
The usage looks something like:
(lldb) settings append target.source-map /foo /bar
Note that you use append here instead of set, because otherwise you'd overwrite the mapping every time you add an entry. You can check the mapping with:
(lldb) settings show target.source-map

Command prompt batch renaming results in syntax error

I need to rename 80k files in multiple folders & subfolders in the same directory. I have been trying to use ren but have been unsuccessful; I get an incorrect syntax error.
My old name looks like this:
c:/users/alice/BiDIR_DOCS_2017_Nov08020423\Company,LLC##NA##7967425.00##7967425.00\Company LLC A and A - Aug2017.pdf BiDIR_DOCS_2017_Nov08020423\Company, LLC##NA##7967425.00##7967425.00\document_# (x.y.z)-test~.pdf
and my new name looks like this:
c:/users/alice/BiDIR_DOCS_2017_Nov08020423\Company,LLC##NA##7967425.00##7967425.00\Company LLC A and A - Aug2017.pdf BiDIR_DOCS_2017_Nov08020423\Company, LLC##NA##7967425.00##7967425.00\system, a old name~ ` to # system b document (xyz)-test.pdf
I have the existing directory print in one column of Excel and in the next column what I want the directory print to be.
I'm not sure if I'm starting my ren command at the right hierarchy of my directory, or if I need quotation marks to keep the spaces and symbols in my new name.
I have tried improvising and testing on my own without success and I cannot find an article online on point.
Try FAR (find and replace) - it a free utility that works well.
http://findandreplace.sourceforge.net/

How to get the full name of a folder if I only know the beginning

I am receiving an input from the user which looks like follows:
echo +++Your input:+++
read USER_INPUT
The way I should use it is to retrieve the full name of a folder which starts with that input, but that contains other stuffs right after. All I know is that the folder is unique.
For example:
User input
123456
Target folder
/somepath/someotherpath/123456-111-222
What I need
MYNEED=123456-111-222
I was thinking to retrieve this with an MYNEED=$(ls /somepath/someotherpath/$USER_INPUT*), but if I do this I will get instead all the content of /somepath/someotherpath/123456-111-222 because that's the only folder existing with that name so the ls command directly goes to the next step.
May I have your idea to retrieve the value 123456-111-222 into a variable that I will need to use after?
basename extracts the filename from the whole path so this will do it:
MYNEED=$(basename /somepath/someotherpath/123456*)

Recursively find folder names only (not files)

Is it possible to display the folder names (only) recursively. I know, to display the files from the specific folder using the following command.
Dir.glob("/home/test/**/*.pdf")
or
Dir['/home/test/**/*.*']
But, i need to display folder name only.
you put a slash, like this
Dir["**/"].each {|x| puts x}

How can I make Textmate always ignore the /log folder in the "Find in Project" search?

How can I make Textmate always ignore the /log folder in the "Find in Project" search?
Add the log folder to the excludeInFolderSearch option in your ~/.tm_properties file, e.g.:
excludeInFolderSearch = "{$excludeInFolderSearch,$extraExcludes,log}"
I found a easier way to do it.
Go to Settings > Advanced > Folder References
And add |log| to the pattern.
valid for TextMate 1
Other answers did not work for me on TextMate 2.0-beta.12. After many frustrating attempts, this line was able to exclude the log, vendor, tmp and .git directories from fuzzy searching.
excludeInFileChooser = "{$excludeInFileChooser,log,vendor,tmp,.git}"
I added this line to a .tm_properties file in my project directory. I verified that this also works if you decide to put the .tm_properties in the home directory.
Edit:
Use excludeInFileChooser for modifying search paths in Textmate's "Go To File" navigation feature, which is activated by ⌘T.
Use excludeInFolderSearch for modifying paths when searching for text within the files of a directory, which is activated by either ⌘F or ⌘↑F
None of these worked for me. What worked was adding the following in a .tm_properties file (project root)
excludeDirectories = "{node_modules,}"
No $exclude variable. Add trailing comma.
For Textmate 2:
Click on the top menu Textmate, then Preferences.
Navigate to the second tab, called Projects.
On the "Exclude files matching" just add 'log' to the end of the list, for example:
{*.{o,pyc},Icon\r,CVS,_darcs,_MTN,\{arch\},blib,*\~.nib,tmp,log}
This should do it, the log folder should no longer be searched, or used as match when opening a file.
Use AckMate, https://github.com/protocool/AckMate and read hot to change the normal Find in Project Shift+Cmd+F here github.com/protocool/AckMate/wiki/Usage
Alternatively you could explicitly tell Mate to look at a specific subset of folders.
~/project/mate app db models
Project find will be restricted to those folders.
Or to just remove the log dir you could add an alias to ~/.profile:
alias m="ls | grep -v 'log' | xargs mate"
Just remove reference to log folder from project tree.
Also you may right click on *.log files and mark then as binary (they will not be searched).
http://wiki.macromates.com/Troubleshooting/FindInProject
For TextMate2 it should be: excludeDirectories = "{$excludeDirectories,log}"

Resources