summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-12-28 11:20:00 -0500
committerBen Sima <ben@bsima.me>2020-12-28 11:20:00 -0500
commitef47d351e347fb24a75afc61eac84a71afa49936 (patch)
tree9ca78b2c43aaba90a2f43a6ba4aa477cb7511a24 /Biz
parentb30746cafc8ac21225652d7bfc45ca13db3ab761 (diff)
add ftags to shell hook
Diffstat (limited to 'Biz')
-rw-r--r--Biz/Bild/ShellHook.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/Biz/Bild/ShellHook.sh b/Biz/Bild/ShellHook.sh
index b40b91e..9f163ba 100644
--- a/Biz/Bild/ShellHook.sh
+++ b/Biz/Bild/ShellHook.sh
@@ -123,3 +123,18 @@ function ci() {
}
help
+
+# ftags - search ctags
+ftags() {
+ local line
+ if [[ -e tags ]]
+ then
+ line=$(
+ awk 'BEGIN { FS="\t" } !/^!/ {print toupper($4)"\t"$1"\t"$2"\t"$3}' tags | \
+ cut -c1-80 | fzf --nth=1,2
+ )
+ ${EDITOR:-vim} \
+ $(cut -f3 <<< "$line") -c "set nocst" \
+ -c "silent tag $(cut -f2 <<< "$line")"
+ fi
+}