From 8a2e1006b3b272126332aa064f3ad95387129544 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Thu, 13 Feb 2025 14:13:49 +0530 Subject: new dot files --- .../zsh-navigation-tools/doc/generate_single_file | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 .config/zsh/oh-my-zsh/plugins/zsh-navigation-tools/doc/generate_single_file (limited to '.config/zsh/oh-my-zsh/plugins/zsh-navigation-tools/doc/generate_single_file') diff --git a/.config/zsh/oh-my-zsh/plugins/zsh-navigation-tools/doc/generate_single_file b/.config/zsh/oh-my-zsh/plugins/zsh-navigation-tools/doc/generate_single_file new file mode 100755 index 0000000..d3d3938 --- /dev/null +++ b/.config/zsh/oh-my-zsh/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" + -- cgit v1.2.3-59-g8ed1b