Brief introduction
When using git, find other tools, generally it needs to further open the file or directory jump.
The usual practice is to use a mouse to copy paste, or entered manually.
PathMarker by providing a fast label, edit the file, directory associated with the jump method and improve efficiency.
Demonstration effect
Installation
The latest installation instructions please refer https://github.com/zqb-all/PathMarker
Download Source
git clone https://github.com/zqb-all/PathMarker.git
cd PathMarker/
git submodule init
git submodule update
installation
Adding PathMarker.py to the PATH, to assist in .bashrc the source script.
ln -s "$(pwd)/PathMarker.py" /usr/local/bin/PathMarker.py
echo "source $(pwd)/PathMarker_help.sh" >> ~/.bashrc
source ~/.bashrc
use
Instead of using t git, git numerals will be output to the file. E.g
t status
t show --stat
Use "v label", to open the corresponding file Vim, e.g.
v 1
Instead of using ffd fd or find find files, you can find the results of the label. E.g
ffd src
Use "FCD label" to jump to the corresponding directory. If the label is a file, go to the directory where the file, for example,
fcd 1
Implementation Notes
background
Before doing this why there is a tool
https://www.cnblogs.com/zqb-all/p/9610792.html
achieve
- Set label
For the command git, find and so will the output file / directory, by encapsulating function, to the first output matching fpp file name, a label, and then output.
In which the match is successful, it will be saved to ~ / .PathMarker file
- Using Labels
For vim, cd etc. require a command file / directory, by encapsulating function, the parameters of the label, with the path name ~ / .PathMarker in
Spread
For other common commands can also encapsulated in the PathMarker_help.sh.
If the function name packaged with other tools / alias conflict, also can modify the PathMarker_help.sh in.