当前位置:网站首页>`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-gui
Select 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-filter
Medium 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
mask
Extract subcommands from the help ofawk
Script , 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 selectionawk
Script , Not visible in the interactive selection list
{
if ("(hidden)" != $2)
print;
}
mask-SubCommand-names-extractor
(hidden) Extract the name of the subcommand
awk
Script
{
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
边栏推荐
- Markdown syntax
- 2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors
- AMLOGIC gsensor debugging
- China battery grade manganese sulfate Market Forecast and strategic consulting report (2022 Edition)
- Nurse level JDEC addition, deletion, modification and inspection exercise
- 《网络是怎么样连接的》读书笔记 - FTTH
- 165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version
- 20220701 barbarat lemma proof
- ArrayBuffer
- Daughter love in lunch box
猜你喜欢
2022-2028 global tensile strain sensor industry research and trend analysis report
LeetCode 74. Search 2D matrix
AMLOGIC gsensor debugging
C language - Introduction - Foundation - syntax - [main function, header file] (II)
2022-2028 global industrial gasket plate heat exchanger industry research and trend analysis report
If you can quickly generate a dictionary from two lists
Four common methods of copying object attributes (summarize the highest efficiency)
How do microservices aggregate API documents? This wave of show~
After unplugging the network cable, does the original TCP connection still exist?
2022-2028 global visual quality analyzer industry research and trend analysis report
随机推荐
Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
How to batch change file extensions in win10
Solution to null JSON after serialization in golang
Latex download installation record
Awk from entry to earth (12) awk can also write scripts to replace the shell
Summary of the most comprehensive CTF web question ideas (updating)
DR6018-CP01-wifi6-Qualcomm-IPQ6010-IPQ6018-FAMILY-2T2R-2.5G-ETH-port-CP01-802-11AX-MU-MIMO-OFDMA
Launpad | 基础知识
Awk from entry to earth (14) awk output redirection
Tkinter Huarong Road 4x4 tutorial II
In depth research and investment strategy report on China's hydraulic parts industry (2022 Edition)
Daughter love: frequency spectrum analysis of a piece of music
C language - Introduction - Foundation - syntax - [variable, constant light, scope] (V)
At the age of 30, I changed to Hongmeng with a high salary because I did these three things
Investment analysis and future production and marketing demand forecast report of China's paper industry Ⓥ 2022 ~ 2028
【leetcode】540. A single element in an ordered array
How should PMP learning ideas be realized?
Research Report on the current market situation and development prospects of calcium sulfate whiskers in China (2022 Edition)
2022-2028 global seeder industry research and trend analysis report
Analysis report on the development status and investment planning of China's modular power supply industry Ⓠ 2022 ~ 2028