tricky
process bar
with dot .
.reference:

another:

another solution:


spinner
[!TIP|label:check more:]
Braille Patterns
[!NOTE|label:references:]
4-dots
28C4
⣄
⣄
378
28C6
⣆
⣆
2378
2847
⡇
⡇
1237
280F
⠏
⠏
1234
280B
⠋
⠋
124
2839
⠹
⠹
1456
28B8
⢸
⢸
4568
28F0
⣰
⣰
5678
28E0
⣠
⣠
678
7-dots
28FE
⣾
⣾
2345678
28FD
⣽
⣽
1345678
28FB
⣻
⣻
1245678
28BF
⢿
⢿
1234568
287F
⡿
⡿
1234567
28DF
⣟
⣟
1234578
28EF
⣯
⣯
1234678
28F7
⣷
⣷
1235678
1-dot
others
bash script
[!TIP|label:use case:]
save & restore screen
tput
tputclear
restore
echo
echosave
restore
terminfo escape sequences
tput
tputreset terminal
[!NOTE]
clear screen
show term
show terminal width

Operation not permitted
Operation not permitted[!NOTE|label:references:]
mac equivalent
/bin/ls -lO
array
differences in bash parameter calls
[!NOTE🏷️thinking:] I got a issue with/without
evalcommands like:
the
--excludeoptions are not passed correctly when using :
but it works when using
eval:
[!TIP|label:tips:]
since
fdOptis a single string (containing multiple arguments), Bash treats it as one single argument when passed tofd. This leads to the following issues:
--exclude '*.png'is treated as one single argument, rather than two separate ones:--excludeand'*.png';As a result, fd cannot correctly interpret the glob pattern and treats it as a literal string; Therefore,
--exclude '*.png'does not actually exclude anything.recommend using arrays to store multiple arguments and then pass them to the command.
details:
fd . ${fdOpt}
❌ No
${fdOpt} is a single string; arguments are not properly split
eval "fd . ${fdOpt}"
✅ Yes
Bash re-splits the command string before execution, but it’s risky
fd . "${fdArgs[@]}"
✅✅ Yes (Recommended)
Uses an argument array — most recommended, safe, and clean
$cmd
❌ Incorrect, treated as a single command
❌ Low
❌ No
Avoid using
eval "$cmd"
✅ Correctly splits arguments
⚠️ Low
✅ Yes
Quick testing or executing ad-hoc command strings
"${cmd[@]}"
✅ Correct and safe argument passing
✅ High
❌ No (no expansion)
Recommended for building command argument lists programmatically
wildcard expansion
eval "echo *.txt"
✅ Yes
Shell expands the wildcard during evaluation
eval "echo '*.txt'"
❌ No
'*.txt' is a quoted string literal, not subject to expansion
"${arr[@]}"
❌ No
Arguments are passed as literal strings, no globbing applied
Last updated
Was this helpful?




