ah: history with output & bookmark

terminalTerminal users need history everyday. ah is a new topping to the cake that adds several powerful features to conventional history. For example, how often do you regret not saving the output from your ssh session? ah can handle it. ah is written in GO and adds to the features of history. It is not a replacement and uses the same file for maintaining history.

ah is a very fresh project. Current features:

  • Trace an output
  • Fetch the output trace
  • Bookmark command
  • Execute a command by number or bookmark
  • Show a history with grep on regular expression or fuzzy match

Download ah from the releases page for your system and arch. Linux users should download linux-386 or linux-amd64 based on architecture.

USAGE

  • To trace a command
    $ ah t -- find . -name "*.go" -type f 

    You can see the output on the terminal as well. In addition, you can redirect stdin and stderr to files if you want.

  • If you want to run a program which requires a pseudo TTY, use the -y option.
  • If you want to have your aliases to work, run it with -x option!
  • To see the history
    $ ah s
    ...
    !10024  (01.11.14 16:01:09) *  ah t -- find . -name "*.go" -type f

    The * in the output means that ah has stored the output of the command

  • To grep from ah’s history
    $ ah s -z -g doigreREPOsoru
  • Show a stored output
    $ ah l 10024
  • Bookmarks
    //Pin a command number
    $ ah b 10024 mybookmark1
    //Execute the above command
    $ ah e mybookmark1
    //List bookmarks
    $ ah lb
    //Remove bookmark
    $ ah rb mybookmark1
  • Garbage collection options
    gb: garbage collect bookmarks
    gt: garbage collect traces
  • Help
    $ ah -h

Webpage: ah

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s