Skip to content

Commit 3fd12d8

Browse files
author
adrianbartyczak
committed
Update command in section View of all main README.md files
1 parent 60c3f40 commit 3fd12d8

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

aliases/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11

22
# aliases/
33

4-
This directory contains aliases. Aliases also constitute as frequently used short functions.
4+
This directory contains aliases and frequently used short functions.
55

66
## View
77

8-
To view all aliases, cd to the aliases directory and run the following:
8+
Cd to this directory and run the following to view the solutions in it:
99

1010
```bash
11-
s='view-Shell-aliases.sh' && git show helper_scripts:"${s}" > /tmp/"${s}" && \
12-
chmod +x /tmp/"${s}" && /tmp/"${s}"
11+
git show-ref --verify -q refs/heads/helper_scripts || \
12+
git branch --track helper_scripts origin/helper_scripts; \
13+
bash <(git show helper_scripts:view-shell-aliases.sh)
1314
```
1415

1516
## Usage
1617

17-
To source all the aliases files in your .bashrc, add the following:
18+
Add the following to your .bashrc to source all the aliases and short functions in your bash runtime:
1819

1920
```bash
20-
for f in $(find <path/to/Shell>/aliases -type f -name '*.aliases*'); do
21-
. "${f}"
21+
for shellAliasesFile in $(find <path/to/shell>/aliases -type f -name '*.aliases*'); do
22+
. "${shellAliasesFile}"
2223
done
2324
```
2425

functions_scripts/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ Functions scripts are scripts consisting of small functions relative to a larger
77

88
## View
99

10-
To view all functions scripts, cd to the functions_scripts directory and run the following:
10+
Cd to this directory and run the following to view the solutions in it:
1111

1212
```bash
13-
s='view-Shell-functions-scripts.sh' && git show helper_scripts:"${s}" > /tmp/"${s}" && \
14-
chmod +x /tmp/"${s}" && /tmp/"${s}"
13+
git show-ref --verify -q refs/heads/helper_scripts || \
14+
git branch --track helper_scripts origin/helper_scripts; \
15+
bash <(git show helper_scripts:view-shell-functions-scripts.sh)
1516
```
1617

one-liners/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ This directory contains one-liners.
55

66
## View
77

8-
To view all one-liners, cd to the one-liners directory and run the following:
8+
Cd to this directory and run the following to view the solutions in it:
99

1010
```bash
11-
s='view-Shell-one-liners.sh' && git show helper_scripts:"${s}" > /tmp/"${s}" && \
12-
chmod +x /tmp/"${s}" && /tmp/"${s}"
11+
git show-ref --verify -q refs/heads/helper_scripts || \
12+
git branch --track helper_scripts origin/helper_scripts; \
13+
bash <(git show helper_scripts:view-shell-one-liners.sh)
1314
```
1415

scripts/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ This directory contains scripts.
55

66
## View
77

8-
To view all scripts, cd to the scripts directory and run the following:
8+
Cd to this directory and run the following to view the solutions in it:
99

1010
```bash
11-
s='view-Shell-scripts.sh' && git show helper_scripts:"${s}" > /tmp/"${s}" && \
12-
chmod +x /tmp/"${s}" && /tmp/"${s}"
11+
git show-ref --verify -q refs/heads/helper_scripts || \
12+
git branch --track helper_scripts origin/helper_scripts; \
13+
bash <(git show helper_scripts:view-shell-scripts.sh)
1314
```
1415

0 commit comments

Comments
 (0)