search
is a program to search the desired folder/file in your file system. search
is similar to the find
and fd
program, but provides a better user experience to select a specific search result.
cmake
with version 3.10+g++
/clang++
compiler- UNIX environemnt
- Clone this repository into your working directory using
git clone
command - Change the directory to the cloned directory
- Compile the program as an executable
search
- Move the program to the directory
/usr/bin
, it requires superuser permissionsudo mv /build/search /usr/bin/search
The program uses the following syntax:
search [OPTIONS]... [PATTERN]
The program supports searching with the use of REgex. For example,
search \.cpp$
- to search all the files end with cpp extension in the current working directory.
search cpp
- to search all the files/folders containing the word cpp
.
flags | descriptions | example |
---|---|---|
-s , -source |
This flag set the root directory of the searching | search -s src |
-d , -depth |
This flag set the depth of of the searching. The value of this flag must be a integer greater than 0 | search -d 1 |
The program contains two modes: (1) Control Mode, and (2) Command Mode. By default, the Control Mode is on.
Control Mode Only
You can quit the program by pressing the keyq
Control Mode Only
You can move the page up and down by using theArrow Up
/k
andArrow Down
/j
respectively.
Command Mode Only
To enter Command Mode, type:
. After entering the Command Mode, you can start typing the command. To switch back to Control Mode, press the keyESC
.You can use the listed number on the left to use as the arguments of your command with the format
_index
. To include all the listed items, use the symbol_0
. For example,: vim _1 #It opens the listed file with index 1 in the vim editor