当前位置:网站首页>`Example of mask ` tool use
`Example of mask ` tool use
2022-07-04 09:29:00 【Hu Zhenghui】
install : Core tools
The main tools used are
mask
stay Mac The installation method in is
brew install mask
install : Tools needed to achieve the default task effect
mask
0.9.0
Default tasks are not supported , So for the time being
Just
.
stay Mac The installation method in is
brew install just
The relevant code is
_default:
mask mask-choose
The operation mode is
just
install : Interactive selection tool
The interactive selection tool is used in the sample code choose-gui, stay Mac The installation method in is
brew install choose-gui
install : Text processing tools
Use... In the sample code awk Processing text , stay Mac The installation method in is
brew install gawk
Code location
Implement the default task effect code
publish
Mask Examples of tool usage
Mission
mask-choose
Use interactive selection tools
choose-guiSelect the commands that can be executed in this document
choose_recipe=$(mask mask-SubCommands-visible | /usr/local/opt/choose-gui/bin/choose)
echo "Choose Recipe: ${choose_recipe}"
task=$(echo "${choose_recipe}" | mask mask-SubCommand-names-extractor)
echo "Task : ${task}"
mask "${task}"
mask-SubCommands
Extract the subcommands in this document
mask --help | mask mask-SubCommands-extractor
mask-SubCommands-visible
Extract the visible subcommands of interactive selection in this document , The beginning of the description is
(hidden)Mark invisible subcommands in interactive selection , staymask-SubCommand-visible-filterMedium filtration
mask mask-SubCommands | mask mask-SubCommand-visible-filter
mask-SubCommand-names
The name list of subcommands in this document
mask mask-SubCommands | mask mask-SubCommand-names-extractor
mask-SubCommand-visible-names
In this document, you can interactively select the name list of visible subcommands
mask mask-SubCommands-visible | mask mask-SubCommand-names-extractor
mask-SubCommands-extractor
(hidden) from
maskExtract subcommands from the help ofawkScript , Not visible in the interactive selection list
{
if ("SubCommands" == section)
{
sub(/^[ ]+/, "");
print;
}
}
{
if ("SUBCOMMANDS:" == $0)
section = "SubCommands"
}
mask-SubCommand-visible-filter
(hidden) Filter the beginning of the description with
(hidden)Mark the... Of subcommands that are not visible in interactive selectionawkScript , Not visible in the interactive selection list
{
if ("(hidden)" != $2)
print;
}
mask-SubCommand-names-extractor
(hidden) Extract the name of the subcommand
awkScript
{
print $1;
}
mask-draft-dir
Scripts for personal local use , Readers please ignore
jump cd mask-draft
code
Scripts for personal local use , Readers please ignore
root_dir=`pwd`
code_workspace="${root_dir}/mask.code-workspace"
if [ -f "${code_workspace}" ]; then
code "${code_workspace}";
else
code "${root_dir}";
fi
边栏推荐
- 《网络是怎么样连接的》读书笔记 - 认识网络基础概念(一)
- How to write unit test cases
- PMP registration process and precautions
- 《网络是怎么样连接的》读书笔记 - WEB服务端请求和响应(四)
- Global and Chinese markets for laser assisted liposuction (LAL) devices 2022-2028: Research Report on technology, participants, trends, market size and share
- 2022-2028 global gasket plate heat exchanger industry research and trend analysis report
- Global and Chinese market of air fryer 2022-2028: Research Report on technology, participants, trends, market size and share
- 2022-2028 global seeder industry research and trend analysis report
- In depth research and investment strategy report on China's hydraulic parts industry (2022 Edition)
- UML 时序图[通俗易懂]
猜你喜欢

AMLOGIC gsensor debugging

After unplugging the network cable, does the original TCP connection still exist?

Daughter love in lunch box

2022-2028 global intelligent interactive tablet industry research and trend analysis report

Logstack configuration details -- elasticstack (elk) work notes 020

2022-2028 global strain gauge pressure sensor industry research and trend analysis report

2022-2028 global seeder industry research and trend analysis report

26. Delete duplicates in the ordered array (fast and slow pointer de duplication)

LeetCode 74. Search 2D matrix

HMS core helps baby bus show high-quality children's digital content to global developers
随机推荐
There are 100 people eating 100 apples, one adult eating 4 apples, and four children eating 1 apple. How can they eat exactly 100 apples? Use any high-level language you are familiar with
Lauchpad X | 模式
Global and Chinese market of air fryer 2022-2028: Research Report on technology, participants, trends, market size and share
What is permission? What is a role? What are users?
Awk from entry to earth (7) conditional statements
How to batch change file extensions in win10
2022-2028 global visual quality analyzer industry research and trend analysis report
Daughter love: frequency spectrum analysis of a piece of music
Mantis creates users without password options
UML 时序图[通俗易懂]
Awk from entry to penetration (6) regular matching
The 14th five year plan and investment risk analysis report of China's hydrogen fluoride industry 2022 ~ 2028
26. Delete duplicates in the ordered array (fast and slow pointer de duplication)
UML sequence diagram [easy to understand]
The map set type is stored in the form of key value pairs, and the iterative traversal is faster than the list set
LinkedList in the list set is stored in order
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
C语言-入门-基础-语法-[标识符,关键字,分号,空格,注释,输入和输出](三)
Awk from entry to earth (12) awk can also write scripts to replace the shell
Ultimate bug finding method - two points