summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+}