Ack: Using --add-type with v. 2.04 - ack

How do I add a new filetype to ack, with version 2.04 (ack-2.04-single-file). I am using the following command (Is there any way to search in filetypes not recognized by ack?), but I receive an error.
$ ack --type-set=input=.i
ack-2.04-single-file: No regular expression found.

Using the following does what I wanted:
--type-add=input:ext:i
I found the answer by creating a .ackrc file with:
ack --create-ackrc

Related

How to fetch part of read only message in imap?

What is the exact FETCH command that is used to read only the text body of message 1?
I tried this below and variations of it but it says BAD Error in IMAP and Unknown command.
**FETCH 1:1 (BODY[HEADER.FIELDS (TEXT)]**
Im executing this in Ubuntu on a terminal for my upcoming exam.
Try _ FETCH 1 (BODY[TEXT]). Why do you have asterisks around your command? You find the possible arguments to the FETCH command in RFC 3501. You can also play around with the interactive tool that I wrote.

Openmdao 1.7.3 error with unicode variables in python2

In the file openmdao/core/problem.py on lines such as 1619 and 1638, it checks if a variable is a string by using:
isinstance(inp, str)
however, this will return false if inp is unicode in python2, and eventually cause the program to raise an exception. In python2, the correct syntax is:
isinstance(inp, basestring)
I understand that basestring is not available in python 3, but there are several ways to write python 2/3 compatible code. Can this be fixed?
feel free to submit a pull request, but please add a test that checks the new functionality

Definition of OSCOMPSTAT values

I've tried to find a table with the definition for each COMPSTAT (related to the tool Control-M workload Automation) return code but without any success.
Can anyone tell me if such a table exists?
Thank you.
It's the return code from whatever task was being executed at that time. By convention, a zero value means 'OK', and anything non-zero means an error of some kind.
Different utilities (i.e. external commands) have different possible return codes, so if the command were SCP then you would look up the code in the SCP documentation, and find that for example, '67' meant 'key exchange failed'.
There is no table that contains the definition of each COMPSTAT return code.
OSCOMPSTAT stand for Control-M Operating System Completion Status.
The value of COMPSTAT is set by the exit code of the command that was called.
Example:
After calling the command [cat file1.txt] the value of COMPSTAT will be:
0 if the file "file1.txt" is found
1 if the file "file1.txt" is not found
After calling the command [ctmfw] the value of COMPSTAT will be:
0 if the specified file is found
7 if the specified file is not found

How to replace rrpmrc file functionality in rpm 5.1.6

In my project I use --rcfile option for rpmbuild settings ... however with new rpm version (5.1.6) this option is not available ... how can I replace the rpmrc file with the new version .. Any doc for help ?
There was this post from the mailing list that explains some options for getting around the removal of the --rcfile command.
Set %optflags in a file and use --macros to point to the file is the replacement for --rcfile. You can use a macro like %{target_cpu} in the path if you wish to have multiple arches supported by a single --macros invocation.

How can I get ack to ignore *.orig files?

I put this in my .ackrc:
--type-set=DUMB=*.orig
--noDUMB
... but I'm still seeing files like main.py.orig in my ack results. I tried doing --type-set=DUMB=*.*.orig too, but that didn't work either.
More info
Run from my command line (OSX Snow Leopard with :
timmfin at lorien in ~/dev/performable/rafa on landing-pages-csv-and-more!
± ack modules --python | grep '.orig'
src/rafa/main.py.orig:25:import rafa.ui.modules.helpers
src/rafa/main.py.orig:26:from rafa.ui.modules.performable_form import PerformableForm
src/rafa/main.py.orig:27:from rafa.ui.modules.page_form import PageEditForm
src/rafa/main.py.orig:28:from rafa.ui.modules.settings_form import SettingsForm
....
timmfin at lorien in ~/dev/performable/rafa on landing-pages-csv-and-more!
± cat ~/.ackrc
--color
--sort-files
--smart-case
--type-set=sass=.sass
--type-set=coffee=.coffee
--ignore-dir=rafa/static
--ignore-dir=compiled
--ignore-dir=compressed
--ignore-dir=venv
--ignore-dir=build
timmfin at lorien in ~/dev/performable/rafa on landing-pages-csv-and-more!
± ack --version
ack 1.94
Running under Perl 5.10.0 at /usr/bin/perl
Now that ack 2.0 is available:
--ignore-file=ext:orig
, either on command line or .ackrc.
It is possible to ignore files by name. To ignore ctags generated files:
--ignore-file=is:tags
Filters for different uses can be found on documentation.
For ack version 1.x
I found this worked if I removed the asterisk (from the Ackmate wiki)
--type-set=DUMB=.orig
--noDUMB
You can see what types of file ackmate supports by running (including those you've specified in ~/.ackrc):
~/Library/Application\ Support/TextMate/PlugIns/AckMate.tmplugin/Contents/Resources/ackmate_ack --help type
For ack version 1.x use the following. In my case, I want to ignore .css files. I have to set the type called SOMETHING. Then set it to --noSOMETHING to remove it from search.
ack --type-set=SOMETHING=.css --noSOMETHING "My Bitcoin."
ack doesn't recognize .orig files in the first place. I'm guessing you are somehow invoking ack -a either from your ackrc or ACK_OPTIONS.

Resources