From 707849e0b2c46cf962f0b6f6911b7dcec3053b4c Mon Sep 17 00:00:00 2001 From: Hugo Wang Date: Mon, 27 Jan 2020 16:47:10 +0800 Subject: [PATCH] updated docs --- docs/builtins.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/docs/builtins.md b/docs/builtins.md index 449a385..f416532 100644 --- a/docs/builtins.md +++ b/docs/builtins.md @@ -73,7 +73,8 @@ Bring background job into foreground. See also `bg`, `jobs`. ## history -List your recent history: +### List your recent history + ``` $ history 1: touch docs/envs.md @@ -82,7 +83,8 @@ $ history 4: find . -name '*.bk' ``` -Search history items (use `%` from SQL to match "anything"): +### Search history items (use `%` from SQL to match "anything") + ``` $ history curl 1: curl -x http://127.0.0.1:1080 https://hugo.wang/http/ip/ @@ -92,7 +94,33 @@ $ history 'curl%hugo' 1: curl -x http://127.0.0.1:1080 https://hugo.wang/http/ip/ ``` -Delete history items +### More features + +``` +$ history --help + +USAGE: + history [FLAGS] [OPTIONS] [PATTERN] + +FLAGS: + -a, --asc Search old items first + -h, --help Prints help information + -n, --no-id Do not show ROWID + -o, --only-id Only show ROWID + -p, --pwd For current directory only + -s, --session For current session only + -d, --show-date Show date + -V, --version Prints version information + +OPTIONS: + -l, --limit [default: 20] + +ARGS: + You can use % to match anything [default: ] +``` + +### Delete history items + ``` $ history delete ```