Skip to content

Commit 0bf3b66

Browse files
os: move shell section under command-line
1 parent ee09eee commit 0bf3b66

File tree

6 files changed

+38
-13
lines changed

6 files changed

+38
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@
3939
- dev: checkout v4 action with sparse checkout scheduled version workflow
4040
- ci: optional setup-python for publish book workflow
4141
- dev: optional setup-python for publish book workflow
42+
- os: move shell section under command-line

docs/os/shell/bash.md renamed to docs/os/command-line/shell/bash.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
Bash is a very common shell environment for Linux and is typically the default shell.
44

5+
![Bourne-Again shell logo](https://en.wikipedia.org/wiki/Bash_(Unix_shell)#/media/File:Gnu-bash-logo.svg){loading=lazy}
6+
57
## Ohmybash
File renamed without changes.

docs/os/shell/index.md renamed to docs/os/command-line/shell/index.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
# Operating System Shell
22

3-
a shell is a computer program that exposes an operating system's services to a human user or other programs. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operation. It is named a shell because it is the outermost layer around the operating system.[1][2]
3+
A shell is a computer program that exposes an operating system's services to a human user or other programs.
4+
5+
Operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operation. It is named a shell because it is the outermost layer around the operating system.
46

57
Command-line shells require the user to be familiar with commands and their calling syntax, and to understand concepts about the shell-specific scripting language (for example, bash), while graphical shells place a low burden on beginning computer users and are characterized as being easy to use, yet most GUI-enabled operating systems also provide CLI shells, normally for performing advanced tasks.
68

79
[Wikipedia: Shell - Computing](https://en.wikipedia.org/wiki/Shell_(computing)){target=_blank .md-button}
810

911
## Command Line Shell
1012

11-
- bash
12-
- zsh
13+
- [bash](bash.md) Bourne Again Shell created as a free version of the Bourne Shell (`sh`)
14+
- [zsh](zsh.md) is an advanced shell with programable command-line completion, extended file globbing, improved variable & array handling and themeable prompts
15+
16+
## Rich prompt
17+
18+
The default shell prompt shows minimal information, e.g. an idicator if a user account is root (`#`) or regular user account (`$`).
19+
20+
A richer and more informative experience by adding a prompt theme.
21+
22+
[:fontawesome-solid-book-open: Starship](starship-prompt.md) provides a cross-shell prompt that conveys more information about the current shell (path, time, execution time of commands, etc.).
23+
24+
![Practicalli Custom version of Starship Cappuccin Powerline preset](https://github.com/practicalli/graphic-design/blob/live/os/command-line/starship-cli-preset-catppuccin-custom.png){loading=lazy}
25+
1326

1427
## Aliases
1528

16-
Define aliases to optomise commands and create useful default flags when calling commands
29+
Define aliases to optimise commands and create useful default flags when calling commands
1730

1831
Use a `shell-aliases` file to define aliases to be used with any command line shell.
1932

@@ -52,7 +65,7 @@ Source the shell aliases from the shell configuration files
5265
```shell title=".bashrc"
5366
# Source Shell Aliases
5467
if [ -f $HOME/.config/shell-aliases ]; then
55-
source $HOME/.config/shell-aliases
68+
source $HOME/.config/shell-aliases
5669
fi
5770
```
5871

docs/os/shell/zsh.md renamed to docs/os/command-line/shell/zsh.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@ Z Shell (zsh) is an advanced shell environment and shell scripting language for
44

55
[Wikipedia - Z Shell](https://en.wikipedia.org/wiki/Z_shell){target=_blank .md-button}
66

7-
## Prezto
87

9-
## OhmyZsh
8+
## Community Configurations
9+
10+
Zsh is a very rich shell and a community configuration provides a quick way to use all those features.
11+
12+
- [Prezto](https://github.com/sorin-ionescu/prezto) with sane defaults, aliases, functions, auto completion and prompt themes
13+
- [OhmyZsh](https://ohmyz.sh/) framework for managing your Zsh configuration with over 300 plugins
14+
15+
If writing your own configuration, consider [Zinit plugin manager](https://github.com/zdharma-continuum/zinit) which installs plugins from their GitHub repository.
16+
17+
Arch Linux has a [guide to configuring Zsh](https://wiki.archlinux.org/title/Zsh).
18+
1019

1120
## Command History
1221

@@ -37,7 +46,7 @@ Edit the whole command history as a file, allowing easy removal of unwanted or d
3746
fc -W; astro "$HISTFILE"; fc -R
3847
````
3948

40-
> Replace `astro` with either `emacsclient`, `nvim`, `vim`, nano or any preferred text editor.
49+
> Replace `astro` with either `emacsclient`, `nvim`, `vim`, `nano` or any preferred text editor.
4150
4251
## Shell aliases for commands
4352

mkdocs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ nav:
185185
- os/command-line/index.md
186186
- Kitty Terminal: os/command-line/kitty-terminal.md
187187
- Warp Terminal: os/command-line/warp.md
188+
- Shell:
189+
- os/command-line/shell/index.md
190+
- Bash: os/command-line/shell/bash.md
191+
- Zsh: os/command-line/shell/zsh.md
192+
- Fish: os/command-line/shell/fish.md
188193
- Linux:
189194
- Overview: os/linux/index.md
190195
- Cron: os/cron.md
@@ -193,11 +198,6 @@ nav:
193198
- Hyprland: os/linux/hyprland.md
194199
- Regolith: os/linux/regolith.md
195200
- MacOSX: os/macosx.md
196-
- Shell:
197-
- os/shell/index.md
198-
- os/shell/bash.md
199-
- os/shell/zsh.md
200-
- os/shell/fish.md
201201
- Persistence:
202202
- persistence/index.md
203203
- RDBMS:

0 commit comments

Comments
 (0)