Skip to content

Commit c8a1148

Browse files
committed
notes
1 parent 1c08b2d commit c8a1148

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

notes/bric_a_brac.scrbl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#lang notes
22

3+
@block{@block-name{PIOSEE}
4+
Problem: Identify the issue
5+
Information: Gather data / information about the situation
6+
Options: Create a list of possible actions / options / alternatives
7+
Select: For every option asses the risk and choose the most appropriate option
8+
Execute: Implement the chosen action.
9+
Communicate with the team and everyone involved / affected
10+
Evaluate: Monitor the situation. Assess the effectiveness.
11+
Search for possible improvements
12+
}
313

414
@block{@block-name{Color models}
515
Systems (RGB, HSL, LCH, OKLCH etc.) to describe colors.

notes/cli/shells.scrbl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#lang notes
22

33
@block{@block-name{Shells: Bash & Fish-shell}
4+
Bash has a feature called “subshells”, where it will start another shell process for certain things. That shell will then be independent and e.g. any changes it makes to variables won’t be visible in the main shell.
5+
#
6+
Fish does not currently have subshells. You will have to find a different solution.
7+
The isolation can usually be achieved by scoping variables (with set -l), but if you really do need to run your code in a new shell environment you can use fish -c 'your code here' to do so explicitly.
8+
() subshells are often confused with {} grouping, which does not use a subshell. When you just need to group, you can use begin; end in fish
9+
#
10+
Subshells are also frequently confused with command substitutions, which bash writes as `command` or $(command) and fish writes as $(command) or (command). Bash also uses subshells to implement them.
11+
#
12+
TODO list of fish functions using () grouping
13+
❯ cd $dtf/.config/fish/functions ─╯
14+
❯ rg -l -g '*.{fish}' '.\(' | rg -v tide\|getopps
15+
16+
417
# check if a file contains only binary zeros
518
# https://stackoverflow.com/a/20226139/5151982
619
# bash (`cat` shouldn't be used in scripts, only on command line)

0 commit comments

Comments
 (0)