summaryrefslogtreecommitdiff
path: root/plugins/zsh-navigation-tools/doc/generate_single_file
diff options
context:
space:
mode:
authorPhilipp Schmitt <pschmitt@users.noreply.github.com>2021-12-24 18:09:01 +0100
committerGitHub <noreply@github.com>2021-12-24 18:09:01 +0100
commit068feca15d09dce6747d0fb6cab2027b938e82bd (patch)
treef3603a06b14c7d51ea59bf745d811319207c7e17 /plugins/zsh-navigation-tools/doc/generate_single_file
parent4f90849425b4f40778e2fdb5281a1bae4117a7c2 (diff)
downloadzsh-068feca15d09dce6747d0fb6cab2027b938e82bd.tar.gz
zsh-068feca15d09dce6747d0fb6cab2027b938e82bd.tar.bz2
zsh-068feca15d09dce6747d0fb6cab2027b938e82bd.zip
feat(zsh-navigation-tools)!: update to zdharma-continuum fork (#10402)
BREAKING CHANGE: the `zsh-navigation-tools` plugin now bundles the version from the zdharma-continuum project, which republished the projects that psprint deleted (we don't yet know yet why). In theory this change doesn't break anything, but be aware of the change and that the upstream repository now lives somewhere else. Source: https://github.com/zdharma-continuum/zsh-navigation-tools/commit/67b24e1
Diffstat (limited to 'plugins/zsh-navigation-tools/doc/generate_single_file')
-rwxr-xr-xplugins/zsh-navigation-tools/doc/generate_single_file35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/zsh-navigation-tools/doc/generate_single_file b/plugins/zsh-navigation-tools/doc/generate_single_file
new file mode 100755
index 000000000..d3d393834
--- /dev/null
+++ b/plugins/zsh-navigation-tools/doc/generate_single_file
@@ -0,0 +1,35 @@
+#!/bin/zsh
+
+local PLUGIN_FILE="doc/zshnavigationtools.plugin.zsh"
+
+[ -d doc ] || cd ..
+
+rm -vf "$PLUGIN_FILE"
+echo "# The preamble comments apply when using ZNT as autoload functions" >>"$PLUGIN_FILE"
+echo "# https://github.com/psprint/zsh-navigation-tools" >>"$PLUGIN_FILE"
+echo "# License is GPLv3 and MIT" >>"$PLUGIN_FILE"
+echo -n "# " >>"$PLUGIN_FILE"
+git show-ref master | head -1 >>"$PLUGIN_FILE"
+echo >>"$PLUGIN_FILE"
+
+for i in n-*(on); do
+ echo "$i() {" >>"$PLUGIN_FILE"
+ cat "$i" >>"$PLUGIN_FILE"
+ echo "}" >>"$PLUGIN_FILE"
+ echo "alias n${i#n-}=$i" >>"$PLUGIN_FILE"
+ echo >>"$PLUGIN_FILE"
+done
+
+# Append znt-* files
+for i in znt-*(on); do
+ echo "$i() {" >>"$PLUGIN_FILE"
+ cat "$i" >>"$PLUGIN_FILE"
+ echo "}" >>"$PLUGIN_FILE"
+ echo >>"$PLUGIN_FILE"
+done
+
+# Append ^R bind
+echo "zle -N znt-history-widget" >>"$PLUGIN_FILE"
+echo "bindkey '^R' znt-history-widget" >>"$PLUGIN_FILE"
+echo "setopt AUTO_PUSHD HIST_IGNORE_DUPS PUSHD_IGNORE_DUPS" >>"$PLUGIN_FILE"
+