id = "hstr" name = "HSTR" homepage = "https://github.com/dvorka/hstr" description = "Bash and Zsh shell history TUI suggest box - easily view, navigate, search and manage your command history." # The HSTR icon, from the project's repository. icon = "https://raw.githubusercontent.com/dvorka/hstr/master/web/hstr-icon.svg" executables = ["hstr", "hh"] [dotfiles] # hstr(1), FILES: "~/.hstr_favorites — Bookmarked favorite commands" and # "~/.hstr_blacklist — Commands to be hidden". Both are plain-text lists the # user builds up, the first through hstr's own bookmark key and the second by # hand; CONFIGURATION.md says the blacklist is read when HSTR_CONFIG contains # `blacklist`, and that commands are "stored in ~/.hstr_blacklist file with a # trailing empty line". The man page names no XDG spelling of either. # # hstr has no config file of its own: CONFIGURATION.md says "HSTR reads the # environment variable HSTR_CONFIG for a comma-separated list of options", which # the user exports from ~/.bashrc or ~/.zshrc — files that belong to the bash and # zsh entries, not this one. The shell history hstr searches ($HISTFILE, # ~/.bash_history, ~/.zsh_history) is history rather than configuration and is # likewise not listed here. paths = ["~/.hstr_favorites", "~/.hstr_blacklist"] exclude = [] # Neither file is a credential store. Both are lists of whole shell command # lines, though, so a consumer that content-scans shell history should scan # these the same way. secret = [] # No machine_lines: a bookmarked command and a hidden command are preferences the # user built deliberately, and a command that happens to name a local path is # not something this catalog can tell apart from one that does not. [commands] format = 1 label = "Search history" description = "Browse or print shell command history. Interactive search is the default; shell setup output is also available." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "man" kind = "manual" url = "https://github.com/dvorka/hstr/blob/master/man/hstr.1" evidence = """ \fB-n --non-interactive\fR Print filtered history on standard output and exit \fB-k --kill-last-command\fR Delete the last command from history and exit \fB-i --insert-in-terminal=[command]\fR Insert custom command in terminal prompt and exit \fB-f --favorites\fR Show favorites view immediately \fB-s --show-configuration\fR Show configuration to be added to the config file of the shell (~/.bashrc or ~/.zshrc) \fB-B --show-bash-configuration\fR Show Bash configuration to be added to ~/.bashrc \fB-Z --show-zsh-configuration\fR Show Zsh configuration to be added to ~/.zshrc \fB-b --show-blacklist\fR Show blacklist of commands to be filtered out before history processing """ [[commands.field]] id = "pattern" label = "Initial filter" type = "string" position = 0 sources = ["man"] [[commands.field]] id = "non_interactive" label = "Print to stdout" description = "Print filtered history on standard output and exit." type = "boolean" option = ["--non-interactive", "-n"] sources = ["man"] [[commands.field]] id = "favorites" label = "Favorites view" type = "boolean" option = ["--favorites", "-f"] sources = ["man"] [[commands.field]] id = "kill_last" label = "Delete last command from history" type = "boolean" option = ["--kill-last-command", "-k"] effect = "delete" sources = ["man"] [[commands.field]] id = "show_config" label = "Show shell configuration" type = "boolean" option = ["--show-configuration", "-s"] sources = ["man"] [[commands.field]] id = "show_bash" label = "Show Bash configuration" type = "boolean" option = ["--show-bash-configuration", "-B"] sources = ["man"] [[commands.field]] id = "show_zsh" label = "Show Zsh configuration" type = "boolean" option = ["--show-zsh-configuration", "-Z"] sources = ["man"] [[commands.field]] id = "show_blacklist" label = "Show blacklist" type = "boolean" option = ["--show-blacklist", "-b"] sources = ["man"] [[commands.task]] id = "search" label = "Print matching history" fields = ["pattern", "non_interactive"] required = ["pattern"] set = { non_interactive = [true] } [[commands.task]] id = "zsh_setup" label = "Zsh setup snippet" fields = ["show_zsh"] required = ["show_zsh"] set = { show_zsh = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["pattern", "non_interactive", "favorites"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["kill_last", "show_config", "show_bash", "show_zsh", "show_blacklist"]