tmux
, then the conclusions of other teams have already been hammered and buried that very useful line.tee
. It worked, but the constant bustle among the endless error.log
, out.log
, output.log
, err.log
log.log
, lll.txt
and so on, if not crazy, then annoying; instead of keeping some kind of order, it was constantly tempting to create a New Folder (1), where they could bury these same logs, periodically backing up the cemeteries: the order implied some sort of systematization, and in the midst of work I didn’t want to remember what to call my file. ➜ ah t -- find ./app -name "*.go" -type f ./app/historyentries/get_commands.go ./app/historyentries/parser.go ./app/historyentries/keeper.go ./app/historyentries/history_entry.go ./app/historyentries/history_processor.go ./app/environments/environments.go ./app/utils/re.go ./app/utils/logging.go ./app/utils/synchronized_writer.go ./app/utils/exec.go ./app/utils/utils.go ./app/commands/bookmark.go ./app/commands/remove_bookmarks.go ./app/commands/gc.go ./app/commands/list_trace.go ./app/commands/tee.go ./app/commands/execute.go ./app/commands/show.go ./app/commands/list_bookmarks.go ./app/slices/slices.go
➜ find ./app -name "*.go" -type f |& tee output.log
➜ ah t -- find ./app -name "*.go" -type f > /dev/null
➜ ah s 10 ... !10109 (02.11.14 18:05:14) nvim main.go !10110 (02.11.14 21:48:12) * ah t -- find ./app -name "*.go" -type f
HISTFILE
and knows about HISTTIMEFORMAT
. Guess why there are exclamation marks next to the number. But what does the star mean before ah t...
? That means ah stores the output of this command. You can view the output using the l
subcommand. ➜ ah l 10110 ./app/historyentries/get_commands.go ./app/historyentries/parser.go ./app/historyentries/keeper.go ./app/historyentries/history_entry.go ./app/historyentries/history_processor.go ./app/environments/environments.go ./app/utils/re.go ./app/utils/logging.go ./app/utils/synchronized_writer.go ./app/utils/exec.go ./app/utils/utils.go ./app/commands/bookmark.go ./app/commands/remove_bookmarks.go ./app/commands/gc.go ./app/commands/list_trace.go ./app/commands/tee.go ./app/commands/execute.go ./app/commands/show.go ./app/commands/list_bookmarks.go ./app/slices/slices.go
ah s 10
means literally "show the last 10 teams". At the same time, the slice syntax is supported (1: 1 as in Python): ah s 10 20
will show all commands from 11 to 20, ah s 10 _20
- from 11 to 20 from the end ( _
, but not -
). You can also search for regular expressions + there is a primitive fuzzy matching.b
subcommand, flip through them with lb
, delete them with rb
, clean old outputs with gt
, but these are trifles.Source: https://habr.com/ru/post/242207/
All Articles