当前位置:网站首页>`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
边栏推荐
- 2022-2028 global visual quality analyzer industry research and trend analysis report
- Markdown syntax
- Global and Chinese trisodium bicarbonate operation mode and future development forecast report Ⓢ 2022 ~ 2027
- How to batch change file extensions in win10
- The child container margin top acts on the parent container
- 2022-2028 global protein confectionery industry research and trend analysis report
- Mac platform forgets the root password of MySQL
- Trim leading or trailing characters from strings- Trim leading or trailing characters from a string?
- Launpad | 基础知识
- Global and Chinese markets of thrombography hemostasis analyzer (TEG) 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
2022-2028 global tensile strain sensor industry research and trend analysis report
Four common methods of copying object attributes (summarize the highest efficiency)
Mantis creates users without password options
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
2022-2028 global special starch industry research and trend analysis report
Markdown syntax
MySQL foundation 02 - installing MySQL in non docker version
Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310
Daughter love: frequency spectrum analysis of a piece of music
2022-2028 global intelligent interactive tablet industry research and trend analysis report
随机推荐
Implementing expired localstorage cache with lazy deletion and scheduled deletion
Sword finger offer 30 contains the stack of Min function
Lauchpad X | 模式
Luogu deep foundation part 1 Introduction to language Chapter 4 loop structure programming (2022.02.14)
Flutter tips: various fancy nesting of listview and pageview
HMS core helps baby bus show high-quality children's digital content to global developers
Reading notes on how to connect the network - tcp/ip connection (II)
2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors
Launpad | 基础知识
Leetcode (Sword finger offer) - 35 Replication of complex linked list
After unplugging the network cable, does the original TCP connection still exist?
2022-2028 global tensile strain sensor industry research and trend analysis report
2022-2028 global seeder industry research and trend analysis report
Deadlock in channel
Awk from entry to soil (5) simple condition matching
In depth investigation and Strategic Research Report on China's motion controller Market (2022 Edition)
Problems encountered by scan, scanf and scanln in golang
How to ensure the uniqueness of ID in distributed environment
2022-2028 global optical transparency industry research and trend analysis report
How does idea withdraw code from remote push