diff --git a/README.cn.md b/README.cn.md index 9b414fd..83141b0 100644 --- a/README.cn.md +++ b/README.cn.md @@ -298,9 +298,19 @@ sys 0m0.030s ## Import database -导入 z.sh 的数据库很简单: +导入 z.sh 的数据文件很简单,格式是一样的: + +```bash cat ~/.z >> ~/.zlua +``` + +导入 autojump 数据文件需要稍微转换下: + +```bash +FN="$HOME/.local/share/autojump/autojump.txt" +awk -F '\t' '{print $2 "|" $1 "|" 0}' $FN >> ~/.zlua +``` ## Credit diff --git a/README.md b/README.md index d5f4563..ecc7e39 100644 --- a/README.md +++ b/README.md @@ -274,6 +274,23 @@ sys 0m0.030s As you see, z.lua is the fastest one and requires less resource. +## Import database + +You can import your datafile from z.sh by: + + +```bash +cat ~/.z >> ~/.zlua +``` + +Import datafile from autojump by: + +```bash +FN="$HOME/.local/share/autojump/autojump.txt" +awk -F '\t' '{print $2 "|" $1 "|" 0}' $FN >> ~/.zlua +``` + + ## Credit Releated projects: