Highlight.js bash and shell

哪种代码高亮更适合终端命令?

bash

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:11:31] 
$ echo 'hello'
hello

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:11:45]
$ pwd
/Users/ganzhixiong

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:12:29]
$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:14:47]
$ echo $0
-zsh

shell

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:11:31] 
$ echo 'hello'
hello

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:11:45]
$ pwd
/Users/ganzhixiong

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:12:29]
$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:14:47]
$ echo $0
-zsh

sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:11:31] 
$ echo 'hello'
hello

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:11:45]
$ pwd
/Users/ganzhixiong

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:12:29]
$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

# ganzhixiong @ ganzhixiongdeMacBook-Pro-3 in ~ [10:14:47]
$ echo $0
-zsh
1
ls -AF | grep -v '[^/]$' | wc -l
1
2
3
4
5
6
7
8
9
10
11
12
bash
$ echo $EDITOR
vim
$ git checkout main
Switched to branch 'main'
Your branch is up-to-date with 'origin/main'.
$ git push
Everything up-to-date
$ echo 'All
> done!'
All
done!
1
2
3
4
5
6
7
8
9
10
11
12
shell
$ echo $EDITOR
vim
$ git checkout main
Switched to branch 'main'
Your branch is up-to-date with 'origin/main'.
$ git push
Everything up-to-date
$ echo 'All
> done!'
All
done!
1
2
3
4
5
6
7
8
9
10
11
12
shell-session
$ echo $EDITOR
vim
$ git checkout main
Switched to branch 'main'
Your branch is up-to-date with 'origin/main'.
$ git push
Everything up-to-date
$ echo 'All
> done!'
All
done!
1
2
3
4
5
6
7
8
9
10
11
12
console
$ echo $EDITOR
vim
$ git checkout main
Switched to branch 'main'
Your branch is up-to-date with 'origin/main'.
$ git push
Everything up-to-date
$ echo 'All
> done!'
All
done!
1
2
3
4
5
6
7
8
9
10
11
12
properties
$ echo $EDITOR
vim
$ git checkout main
Switched to branch 'main'
Your branch is up-to-date with 'origin/main'.
$ git push
Everything up-to-date
$ echo 'All
> done!'
All
done!
1
2
3
powershell
cd ~/development
tar xf ~/Downloads/flutter_linux_2.2.3-stable.tar.xz
1
2
3
console
cd ~/development
tar xf ~/Downloads/flutter_linux_2.2.3-stable.tar.xz
1
2
3
shell
cd ~/development
tar xf ~/Downloads/flutter_linux_2.2.3-stable.tar.xz
1
2
3
bash
cd ~/development
tar xf ~/Downloads/flutter_linux_2.2.3-stable.tar.xz

Highlight.js bash and shell

https://ganzhixiong.com/p/c8ee7999/

Author

干志雄

Posted on

2021-07-06

Updated on

2021-07-06

Licensed under

Comments