当前位置:网站首页>`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 should PMP learning ideas be realized?
- Solution to null JSON after serialization in golang
- Global and Chinese market of sampler 2022-2028: Research Report on technology, participants, trends, market size and share
- Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310
- The 14th five year plan and investment risk analysis report of China's hydrogen fluoride industry 2022 ~ 2028
- 上周热点回顾(6.27-7.3)
- Dynamic analysis and development prospect prediction report of high purity manganese dioxide in the world and China Ⓡ 2022 ~ 2027
- Analysis report on the development status and investment planning of China's modular power supply industry Ⓠ 2022 ~ 2028
- 《网络是怎么样连接的》读书笔记 - 集线器、路由器和路由器(三)
猜你喜欢

2022-2028 global gasket metal plate heat exchanger industry research and trend analysis report

HMS core helps baby bus show high-quality children's digital content to global developers

Daughter love in lunch box

GoLand environment variable configuration

2022-2028 global gasket plate heat exchanger industry research and trend analysis report

2022-2028 global tensile strain sensor industry research and trend analysis report
![[C Advanced] file operation (2)](/img/50/e3f09d7025c14ee6c633732aa73cbf.jpg)
[C Advanced] file operation (2)
](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
C語言-入門-基礎-語法-[運算符,類型轉換](六)

MySQL foundation 02 - installing MySQL in non docker version

At the age of 30, I changed to Hongmeng with a high salary because I did these three things
随机推荐
C语言-入门-基础-语法-[标识符,关键字,分号,空格,注释,输入和输出](三)
You can see the employment prospects of PMP project management
AMLOGIC gsensor debugging
Solution to null JSON after serialization in golang
UML sequence diagram [easy to understand]
Some points needing attention in PMP learning
Report on research and investment prospects of polyglycolic acid industry in China (2022 Edition)
Report on research and investment prospect prediction of China's electronic grade sulfuric acid industry (2022 Edition)
Launpad | Basics
Trees and graphs (traversal)
C language - Introduction - Foundation - syntax - [main function, header file] (II)
Mantis creates users without password options
Clion console output Chinese garbled code
Tkinter Huarong Road 4x4 tutorial II
China electronic grade sulfur trioxide Market Forecast and investment strategy report (2022 Edition)
Leetcode (Sword finger offer) - 35 Replication of complex linked list
[on February 11, 2022, the latest and most fully available script library collection of the whole network, a total of 23]
At the age of 30, I changed to Hongmeng with a high salary because I did these three things
In depth research and investment strategy report on China's hydraulic parts industry (2022 Edition)
2022-2028 global protein confectionery industry research and trend analysis report