feat: update: #4518, Add examples for command: hide, history, from yml, def-env, and table (#4581)

This commit is contained in:
Justin Ma
2022-02-21 21:52:50 +08:00
committed by GitHub
parent 4f367a59de
commit 917886f8ad
7 changed files with 136 additions and 46 deletions

View File

@ -76,16 +76,16 @@ fn test_no_color_flag() {
}
#[test]
fn test_html_color_history_flag_dark_false() {
fn test_html_color_cd_flag_dark_false() {
let actual = nu!(
cwd: ".", pipeline(
r#"
history --help | to html --html-color
cd --help | to html --html-color
"#
)
);
assert_eq!(
actual.out,
r"<html><style>body { background-color:white;color:black; }</style><body>Get the command history<br><br>Usage:<br> &gt; history {flags} <br><br>Flags:<br> -h, --help<br> Display this help message<br> -c, --clear<br> Clears out the history entries<br><br></body></html>"
r"<html><style>body { background-color:white;color:black; }</style><body>Change directory.<br><br>Usage:<br> &gt; cd (path) <br><br>Flags:<br> -h, --help<br> Display this help message<br><br>Parameters:<br> (optional) path: the path to change to<br><br>Examples:<br> Change to your home directory<br> &gt; <span style='color:#037979;font-weight:bold;'>cd<span style='color:black;font-weight:normal;'> </span></span><span style='color:#037979;'>~<span style='color:black;font-weight:normal;'><br><br></body></html></span></span>"
);
}