How can I install and use ack library on Windows?

前端 未结 9 1571
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 23:37

I have never used Perl, but I am really impressed by the ack, which I would like to use for source code searching, etc.

Can anyone guide me of how to make use of this ex

9条回答
  •  半阙折子戏
    2021-01-29 23:52

    If you have cygwin installed, you can simply download the standalone version. Perl is installed with cygwin. Here are the steps:

    $ vim .bash_profile
    

    Remove the comments from the lines:

    # if [ -d "${HOME}/bin" ] ; then
    #  PATH="${HOME}/bin:${PATH}"
    # fi
    

    Load the changes:

    $ source .bash_profile
    

    Make a bin directory:

    $ mkdir ~/bin
    

    Download ack (from the homepage):

    $ curl https://beyondgrep.com/ack-2.22-single-file > ~/bin/ack && chmod 0755 ~/bin/ack
    

    Note: you will have to manually install curl as it doesn't come with cygwin by default.

提交回复
热议问题