summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
Diffstat (limited to 'Biz')
-rw-r--r--Biz/Bild.nix1
-rwxr-xr-xBiz/Ide/ftags (renamed from Biz/Ide/ftags.sh)7
-rwxr-xr-xBiz/Ide/hoog (renamed from Biz/Ide/hoog.sh)0
-rwxr-xr-xBiz/Ide/init_tags.sh12
-rwxr-xr-xBiz/Ide/mktags27
5 files changed, 34 insertions, 13 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index 15d9134..547ccb9 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -117,6 +117,7 @@ rec {
# this should just be dev tools
buildInputs = with nixpkgs.pkgs; [
bild
+ ctags
figlet
git
haskell.packages.${constants.ghcCompiler}.fast-tags
diff --git a/Biz/Ide/ftags.sh b/Biz/Ide/ftags
index fba7fb0..6899faa 100755
--- a/Biz/Ide/ftags.sh
+++ b/Biz/Ide/ftags
@@ -3,7 +3,12 @@
# search tags with fzf
#
set -euo pipefail
- tags=$BIZ_ROOT/tags
+ if [[ "$EDITOR" =~ ^emacs ]]; then
+ echo "error: emacs tags not supported"
+ exit 1
+ else
+ tags=$BIZ_ROOT/tags
+ fi
tag_search=$(
awk 'BEGIN { FS="\t" } !/^!/ {print toupper($4)"\t"$1"\t"$2"\t"$3}' "$tags" \
| cut -c1-80 \
diff --git a/Biz/Ide/hoog.sh b/Biz/Ide/hoog
index 976f0d4..976f0d4 100755
--- a/Biz/Ide/hoog.sh
+++ b/Biz/Ide/hoog
diff --git a/Biz/Ide/init_tags.sh b/Biz/Ide/init_tags.sh
deleted file mode 100755
index 0efc0ed..0000000
--- a/Biz/Ide/init_tags.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-#
-# fast-tags wrapper to generate tags automatically if there are none.
-#
- fns=$@
- if [[ ! -r tags ]]; then
- echo Generating tags from scratch...
- exec fast-tags $flags -R .
- else
- exec fast-tags $fns
- fi
-##
diff --git a/Biz/Ide/mktags b/Biz/Ide/mktags
new file mode 100755
index 0000000..b5b55c7
--- /dev/null
+++ b/Biz/Ide/mktags
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+#
+# script to generate tags automatically if there are none.
+#
+ set -euxo pipefail
+ files=$@
+ tags=$BIZ_ROOT/tags
+ flags=()
+ if [[ "$EDITOR" =~ ^emacs ]]; then
+ flags+=("-e")
+ fi
+ if [[ ! -r $tags ]]; then
+ echo Generating tags from scratch...
+ fast-tags "${flags[@]}" -R $BIZ_ROOT
+ ctags "${flags[@]}" \
+ --append=yes \
+ --recurse=yes \
+ --exclude="$BIZ_ROOT/_/*" \
+ $BIZ_ROOT
+ else
+ fast-tags "${flags[@]}" $files
+ ctags "${flags[@]}" \
+ --append=yes \
+ --exclude="_/*" \
+ $files
+ fi
+##