Total Pageviews

Wednesday 2 May 2018

mac机器上的图形化搜索工具VisualAck

VisualAck is like grep (or ack), except faster and with UI.
Requirements: Mac OS X 10.5 or greater.
 
Command-line arguments
vack [OPTIONS] PATTERN [FILE/DIRECTORY]
Available options:
  • - - invokes UI (instead of printing the results to stdout)
  • -i, --ignore-case - case insensitive search
  • --[no]color - highlight the matching text (default: on unless output is redirected)
  • --[no]clour - same as --no[color]
  • --help - show help
  • --version - show version
Examples:
  • vack foo - search current directory and its subdirectories for files containing 'foo'
  • vack - foo - invoke the UI to search current directory and its subdirectories for files containing 'foo'
  • vack foo bar.txt - search file 'bar.txt' for text 'foo', case sensitive.
  • vack -i foo dir1 ~/dir2 - search text 'foo', case insensitive in directory dir1 and ~/dir2.

Note: you must run VisualAck at least once in order for the vack executable to be added to $PATH.
How is VisualAck different than grep?
For one, it has both command-line version and UI.
In behavior, VisualAck is modelled after ack (hence the name), except it's written as a native Cocoa application (as opposed to a perl script).
Two main differences from grep are:
  • by default it recurses into subdirectories
  • it's faster and gives more useful results by only searching files of known types and skipping certain directories, like .git or .svn, that usually don't contain information user is interested in
VisualAck aims to support the same features as ack, but that reality is still far away. At the moment it only supports the basic options.

from  https://blog.kowalczyk.info/software/vack/

No comments:

Post a Comment