Added bash-support
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
5b8989ac04
commit
fc7dc3f34a
@ -1 +0,0 @@
|
|||||||
Subproject commit 309d6fe45859f2d30d0e8fe8016ca69f03b9f7d6
|
|
49
.config/nvim/plugged/bash-support.vim/README
Normal file
49
.config/nvim/plugged/bash-support.vim/README
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
This is a mirror of http://www.vim.org/scripts/script.php?script_id=365
|
||||||
|
|
||||||
|
Write BASH-scripts by inserting comments, statements, tests, variables, builtins, etc..
|
||||||
|
Speed up writing new scripts considerably.
|
||||||
|
Write code und comments with a professional appearance from the beginning.
|
||||||
|
|
||||||
|
Here are some screen shots : http://lug.fh-swf.de/vim/vim-bash/screenshots-en.html
|
||||||
|
|
||||||
|
The help file online : http://lug.fh-swf.de/vim/vim-bash/bashsupport.html
|
||||||
|
|
||||||
|
The key mappings of this plugin (PDF) : http://lug.fh-swf.de/vim/vim-bash/bash-hotkeys.pdf
|
||||||
|
|
||||||
|
DOCUMENTATION
|
||||||
|
--------------------------------------------------------
|
||||||
|
This plugin comes with a help file (bashsupport.txt).
|
||||||
|
Read it with
|
||||||
|
|
||||||
|
:h bashsupport
|
||||||
|
|
||||||
|
** PLEASE READ THE DOCUMENTATION **
|
||||||
|
|
||||||
|
Editing actions differ for different modes!
|
||||||
|
There are a lot of features which can be configured or customized to match your needs.
|
||||||
|
|
||||||
|
The installation explained: http://www.thegeekstuff.com article
|
||||||
|
"Make Vim as Your Bash-IDE Using bash-support Plugin"
|
||||||
|
(http://www.thegeekstuff.com/2009/02/make-vim-as-your-bash-ide-using-bash-support-plugin)
|
||||||
|
|
||||||
|
Plugin featured in the linux.com article 'Turn Vim into a bash IDE' : http://www.linux.com/articles/114359
|
||||||
|
|
||||||
|
GitHub
|
||||||
|
--------------------------------------------------------
|
||||||
|
Bash Support is on GitHub:
|
||||||
|
|
||||||
|
https://github.com/WolfgangMehner/vim-plugins
|
||||||
|
|
||||||
|
(Please help us keep track of all the issues and name your report/request "Bash-Support: <title>")
|
||||||
|
|
||||||
|
MAILING LIST
|
||||||
|
--------------------------------------------------------
|
||||||
|
You can subscribe to the vim-plugins-list mailing list to post your questions or
|
||||||
|
suggestions for improvement or to report bugs. The list will also be used to
|
||||||
|
announce new releases ( c.vim / bash-support / perl-support / doxygen-support ).
|
||||||
|
Visit the following page for subscribing to the mailing list:
|
||||||
|
|
||||||
|
http://lug.fh-swf.de/cgi-bin/mailman/listinfo/vim-plugins-list
|
||||||
|
|
||||||
|
The vim-plugins-list list is very low on traffic.
|
||||||
|
|
3883
.config/nvim/plugged/bash-support.vim/autoload/mmtemplates/core.vim
Normal file
3883
.config/nvim/plugged/bash-support.vim/autoload/mmtemplates/core.vim
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,193 @@
|
|||||||
|
README for bash-support.vim (Version 4.2.1) / March 25 2014
|
||||||
|
|
||||||
|
* INSTALLATION
|
||||||
|
* RELEASE NOTES
|
||||||
|
* FILES
|
||||||
|
* ADDITIONAL TIPS
|
||||||
|
|
||||||
|
Bash Support implements a bash-IDE for Vim/gVim. It is written to considerably
|
||||||
|
speed up writing code in a consistent style. This is done by inserting
|
||||||
|
complete statements, comments, idioms, and code snippets. Syntax checking,
|
||||||
|
running a script, starting a debugger can be done with a keystroke. There are
|
||||||
|
many additional hints and options which can improve speed and comfort when
|
||||||
|
writing shell scripts.
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
INSTALLATION
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
(1) LINUX
|
||||||
|
----------
|
||||||
|
|
||||||
|
The subdirectories in the zip archive bash-support.zip mirror the directory
|
||||||
|
structure which is needed below the local installation directory $HOME/.vim/
|
||||||
|
(find the value of $HOME with ":echo $HOME" from inside Vim).
|
||||||
|
|
||||||
|
(1.0) Save the template files in '$HOME/.vim/bash-support/templates/Templates' if
|
||||||
|
you have changed any of them.
|
||||||
|
|
||||||
|
(1.1) Copy the zip archive bash-support.zip to $HOME/.vim and run
|
||||||
|
|
||||||
|
unzip bash-support.zip
|
||||||
|
|
||||||
|
(1.2) Loading of plugin files must be enabled. If not use
|
||||||
|
|
||||||
|
:filetype plugin on
|
||||||
|
|
||||||
|
This is the minimal content of the file '$HOME/.vimrc'. Create one if there
|
||||||
|
is none or use the files in $HOME/.vim/bash-support/rc as a starting point.
|
||||||
|
|
||||||
|
(1.3) Set at least some personal details in the file
|
||||||
|
'$HOME/.vim/bash-support/templates/Templates'
|
||||||
|
Here is the minimal personalization (my settings as an example):
|
||||||
|
|
||||||
|
SetMacro( 'AUTHOR', 'Dr. Fritz Mehner' )
|
||||||
|
SetMacro( 'AUTHORREF', 'fgm' )
|
||||||
|
SetMacro( 'EMAIL', 'mehner.fritz@fh-swf.de' )
|
||||||
|
SetMacro( 'ORGANIZATION','FH Südwestfalen, Iserlohn' )
|
||||||
|
SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )
|
||||||
|
|
||||||
|
(Read more about the template system in the plugin documentation)
|
||||||
|
|
||||||
|
(1.4) Make the plugin help accessable by typing the following command on the
|
||||||
|
Vim command line:
|
||||||
|
|
||||||
|
:helptags $HOME/.vim/doc/
|
||||||
|
|
||||||
|
(1.5) Consider additional settings in the file '$HOME/.vimrc'. The files
|
||||||
|
customization.vimrc and customization.gvimrc are replacements or extensions
|
||||||
|
for your .vimrc and .gvimrc. You may want to use parts of them. The files
|
||||||
|
are documented.
|
||||||
|
|
||||||
|
|
||||||
|
(2) WINDOWS
|
||||||
|
------------
|
||||||
|
|
||||||
|
The subdirectories in the zip archive bash-support.zip mirror the directory
|
||||||
|
structure which is needed below the local installation directory
|
||||||
|
$HOME/vimfiles/ (find the value of $HOME with ":echo $HOME" from inside Vim).
|
||||||
|
|
||||||
|
(2.0) Save the template files in '$HOME/vimfiles/bash-support/templates/Templates'
|
||||||
|
if you have changed any of them.
|
||||||
|
|
||||||
|
(2.1) Copy the zip archive bash-support.zip to $HOME/vimfiles and run
|
||||||
|
|
||||||
|
unzip bash-support.zip
|
||||||
|
|
||||||
|
(2.2) Loading of plugin files must be enabled. If not use
|
||||||
|
|
||||||
|
:filetype plugin on
|
||||||
|
|
||||||
|
This is the minimal content of the file '$HOME/_vimrc'. Create one if there
|
||||||
|
is none or use the files in $HOME/vimfiles/bash-support/rc as a starting point.
|
||||||
|
|
||||||
|
(2.3) Set at least some personal details in the file
|
||||||
|
'$HOME/vimfiles/bash-support/templates/Templates'
|
||||||
|
Here is the minimal personalization (my settings as an example):
|
||||||
|
|
||||||
|
SetMacro( 'AUTHOR', 'Dr. Fritz Mehner' )
|
||||||
|
SetMacro( 'AUTHORREF', 'fgm' )
|
||||||
|
SetMacro( 'EMAIL', 'mehner.fritz@fh-swf.de' )
|
||||||
|
SetMacro( 'ORGANIZATION','FH Südwestfalen, Iserlohn' )
|
||||||
|
SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )
|
||||||
|
|
||||||
|
(Read more about the template system in the plugin documentation)
|
||||||
|
|
||||||
|
(2.4) Make the plugin help accessable by typing the following command on the
|
||||||
|
Vim command line:
|
||||||
|
|
||||||
|
:helptags $HOME\vimfiles\doc\
|
||||||
|
|
||||||
|
(2.5) Consider additional settings in the file '$HOME/_vimrc'. The files
|
||||||
|
customization.vimrc and customization.gvimrc are replacements or extensions
|
||||||
|
for your _vimrc and _gvimrc. You may want to use parts of them. The files
|
||||||
|
are documented.
|
||||||
|
|
||||||
|
There are a lot of features and options which can be used and influenced:
|
||||||
|
|
||||||
|
* use of template files and tags
|
||||||
|
* using and managing personal code snippets
|
||||||
|
* bash dictionary for keyword completion
|
||||||
|
* removing the root menu
|
||||||
|
* using additional plugins
|
||||||
|
|
||||||
|
Look at the bashsupport help with
|
||||||
|
|
||||||
|
:help bashsupport
|
||||||
|
|
||||||
|
+-----------------------------------------------+
|
||||||
|
| +-------------------------------------------+ |
|
||||||
|
| | ** Please read the documentation ** | |
|
||||||
|
| | Actions differ for different modes! | |
|
||||||
|
| +-------------------------------------------+ |
|
||||||
|
+-----------------------------------------------+
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 4.2.1
|
||||||
|
=======================================================================================
|
||||||
|
- Bugfix: Setup of local templates in case of global installation.
|
||||||
|
- Help: Bash and utility manuals wrapped on window width.
|
||||||
|
- Bugfix: \hm and \hh work wrong in insert mode.
|
||||||
|
- Bugfix: Better compatibility with custom mappings
|
||||||
|
(use "normal!" and "noremap" consistently).
|
||||||
|
- Added 'Bash_SetMapLeader' and 'Bash_ResetMapLeader'.
|
||||||
|
- Minor corrections and improvements.
|
||||||
|
|
||||||
|
OLDER RELEASE NOTES : see file 'ChangeLog'
|
||||||
|
=======================================================================================
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
FILES
|
||||||
|
=======================================================================================
|
||||||
|
|
||||||
|
README.bashsupport This file.
|
||||||
|
|
||||||
|
ftplugin/sh.vim The bash filetype plugin.
|
||||||
|
plugin/bash-support.vim The bash plugin for Vim/gVim.
|
||||||
|
bash-support/scripts/wrapper.sh A wrapper script for the use of an xterm.
|
||||||
|
|
||||||
|
doc/bashsupport.txt The help file for the local online help.
|
||||||
|
|
||||||
|
bash-support/codesnippets/* Some code snippets as a starting point.
|
||||||
|
|
||||||
|
bash-support/templates/* bash template files (see bashsupport.txt).
|
||||||
|
|
||||||
|
bash-support/wordlists/* Additional word lists (dictionaries).
|
||||||
|
|
||||||
|
----------------------- -------------------------------------------------------------
|
||||||
|
----------------------- The following files and extensions are for convenience only.
|
||||||
|
bash-support.vim will work without them.
|
||||||
|
-------------------------------------------------------------
|
||||||
|
|
||||||
|
bash-support/rc/customization.bashrc Additional settings I use in .bashrc:
|
||||||
|
set the prompt P2, P3, P4 (for debugging).
|
||||||
|
|
||||||
|
bash-support/rc/customization.vimrc Additional settings I use in .vimrc: incremental
|
||||||
|
search, tabstop, hot keys, font, use of dictionaries,
|
||||||
|
... The file is commented. Append it to your .vimrc
|
||||||
|
if you like.
|
||||||
|
|
||||||
|
bash-support/rc/customization.gvimrc Additional settings I use in .gvimrc: hot keys,
|
||||||
|
mouse settings, ... The file is commented.
|
||||||
|
Append it to your .gvimrc if you like.
|
||||||
|
|
||||||
|
bash-support/doc/* Hotkey reference card (PDF), changelog.
|
||||||
|
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
ADDITIONAL TIPS
|
||||||
|
=======================================================================================
|
||||||
|
|
||||||
|
(1) gvim. Toggle 'insert mode' <--> 'normal mode' with the right mouse button
|
||||||
|
(see mapping in file customization.gvimrc).
|
||||||
|
|
||||||
|
(2) gvim. Use tear off menus and
|
||||||
|
|
||||||
|
(3) try 'Focus under mouse' as window behavior (No mouse click when the mouse
|
||||||
|
pointer is back from the menu entry).
|
||||||
|
|
||||||
|
(4) Use Emulate3Buttons "on" (X11) even for a 3-button mouse. Pressing left and
|
||||||
|
right button simultaneously without moving your fingers is faster then
|
||||||
|
moving a finger to the middle button (often a wheel).
|
||||||
|
|
||||||
|
=======================================================================================
|
@ -0,0 +1,21 @@
|
|||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: _trap_DEBUG
|
||||||
|
# DESCRIPTION: Trap code for the pseudo-signal DEBUG. Generate a message.
|
||||||
|
# The DEBUG trap is not inherited by functions.
|
||||||
|
# Use 'set -o functrace'
|
||||||
|
# PARAMETERS: 1) identification (e.g. line number $LINENO)
|
||||||
|
# 2) variable name(s) to be tracked
|
||||||
|
#===============================================================================
|
||||||
|
function _trap_DEBUG ()
|
||||||
|
{
|
||||||
|
declare identification=$1;
|
||||||
|
while [ ${#} -gt 1 ]; do
|
||||||
|
shift
|
||||||
|
echo -e "DEBUG [$identification] ${1} = '${!1}'"
|
||||||
|
done
|
||||||
|
} # ---------- end of function _trap_DEBUG ----------
|
||||||
|
|
||||||
|
trap '_trap_DEBUG $LINENO <-variable names->' DEBUG # trap DEBUG
|
||||||
|
|
||||||
|
#trap - DEBUG # reset the DEBUG trap
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: _trap_ERROR
|
||||||
|
# DESCRIPTION: Trap code for the pseudo-signal ERR (A command returning a
|
||||||
|
# non-zero exit status). Generates an error message.
|
||||||
|
# PARAMETERS: The current line number given by $LINENO .
|
||||||
|
#===============================================================================
|
||||||
|
function _trap_ERROR ()
|
||||||
|
{
|
||||||
|
echo -e "\nERROR line ${1}: Command exited with status ${?}"
|
||||||
|
} # ---------- end of function _trap_ERROR ----------
|
||||||
|
|
||||||
|
trap '_trap_ERROR $LINENO' ERR # trap ERR
|
||||||
|
|
||||||
|
#trap - ERR # reset the ERR trap
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: _trap_EXIT
|
||||||
|
# DESCRIPTION: Trap code for the pseudo-signal EXIT. Generates an message.
|
||||||
|
# PARAMETERS: The current line number given by $LINENO .
|
||||||
|
#===============================================================================
|
||||||
|
function _trap_EXIT ()
|
||||||
|
{
|
||||||
|
echo -e "\nEXIT line ${1}: Script exited with status ${?}"
|
||||||
|
} # ---------- end of function ----------
|
||||||
|
|
||||||
|
trap '_trap_EXIT $LINENO' EXIT # trap EXIT
|
||||||
|
|
||||||
|
#trap - EXIT # reset the EXIT trap
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: _trap_RETURN
|
||||||
|
# DESCRIPTION: Trap code for the pseudo-signal RETURN. Generates a message.
|
||||||
|
# The RETURN trap is not inherited by functions.
|
||||||
|
# Use 'set -o functrace'
|
||||||
|
# PARAMETERS: The current line number given by $LINENO .
|
||||||
|
# variable(s) to be tracked
|
||||||
|
#===============================================================================
|
||||||
|
function _trap_RETURN ()
|
||||||
|
{
|
||||||
|
echo -e "\nRETURN line ${1}: "
|
||||||
|
} # ---------- end of functionn _trap_RETURN ----------
|
||||||
|
|
||||||
|
trap '_trap_RETURN $LINENO' RETURN # trap RETURN
|
||||||
|
|
||||||
|
#trap - RETURN # reset the RETURN trap
|
||||||
|
|
@ -0,0 +1,5 @@
|
|||||||
|
basename=${pathname##*/}
|
||||||
|
dirname=${pathname%/*}
|
||||||
|
filename=${basename%%.*}
|
||||||
|
lastextension=${basename##*.}
|
||||||
|
allextensions=${basename#*.}
|
@ -0,0 +1,3 @@
|
|||||||
|
if [[ $number =~ ^[+-]?[0-9]+$ ]] ; then
|
||||||
|
echo -e "match found : (signed) integer\n"
|
||||||
|
fi
|
@ -0,0 +1,3 @@
|
|||||||
|
if [[ $number =~ ^[0-9]+$ ]] ; then
|
||||||
|
echo -e "match found : integer\n"
|
||||||
|
fi
|
@ -0,0 +1,5 @@
|
|||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Check number of command line arguments
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
[ $# -lt 1 ] && { echo -e "\n\tUsage: ${0##/*/} File\n"; exit 1; }
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
TMPFILE=$( mktemp /tmp/example.XXXXXXXXXX ) || exit 1
|
||||||
|
|
||||||
|
rm --force $TMPFILE
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
TMPDIR=${TMPDIR:-/tmp} # defaults to /tmp if unset
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Creates a particular temporary directory inside $TMPDIR.
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
TEMPORARY_DIR=$(mktemp -d "$TMPDIR/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") || \
|
||||||
|
{ echo "ERROR creating a temporary file"; exit 1; }
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# When the program exits, it tries to remove the temporary folder.
|
||||||
|
# This code is executed even if the process receives a signal 1,2,3 or 15.
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
trap '[ "$TEMPORARY_DIR" ] && rm --recursive --force "$TEMPORARY_DIR"' 0
|
||||||
|
|
||||||
|
touch $TEMPORARY_DIR/tempfile # new tempfile inside folder
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# cleanup temporary file in case of a keyboard interrupt (SIGINT)
|
||||||
|
# or a termination signal (SIGTERM)
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
function cleanup_temp
|
||||||
|
{
|
||||||
|
[ -e $tmpfile ] && rm --force $tmpfile
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
trap cleanup_temp SIGHUP SIGINT SIGPIPE SIGTERM
|
||||||
|
|
||||||
|
tmpfile=$(mktemp) || { echo "$0: creation of temporary file failed!"; exit 1; }
|
||||||
|
|
||||||
|
# use tmpfile ...
|
||||||
|
|
||||||
|
rm --force $tmpfile
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
# PS4 : timestamp; the current time in 24-hour HH:MM:SS format
|
||||||
|
PS4='+[\t] '
|
||||||
|
|
||||||
|
# PS4 : timestamp; 'seconds.nanoseconds' since 1970-01-01 00:00:00 UT
|
||||||
|
PS4='+[$(date "+%s.%N")] '
|
||||||
|
|
||||||
|
# PS4 : position, line number, function name
|
||||||
|
# The following line avoids error messages due to an unset FUNCNAME[0] :
|
||||||
|
# set +o nounset # Treat unset variables as an error
|
||||||
|
#
|
||||||
|
PS4='+|${BASH_SOURCE##*/} ${LINENO}${FUNCNAME[0]:+ ${FUNCNAME[0]}}| '
|
||||||
|
|
||||||
|
# PS4 : position, line number, function name, subshell information
|
||||||
|
# The following line avoids error messages due to an unset FUNCNAME[0] :
|
||||||
|
# set +o nounset # Treat unset variables as an error
|
||||||
|
#
|
||||||
|
PS4='+(${BASH_SOURCE##*/}: ${LINENO}) : ${FUNCNAME[0]} - [level ${SHLVL}, '
|
||||||
|
PS4=$PS4'subshell ${BASH_SUBSHELL}, return code $?]\n '
|
||||||
|
|
||||||
|
# PS4 : default prompt
|
||||||
|
PS4='+ '
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: _assert
|
||||||
|
# DESCRIPTION: Abort the script if assertion is false.
|
||||||
|
# PARAMETERS: 1) expression used as test inside brackets
|
||||||
|
# 2) optional information, e.g. $LINENO
|
||||||
|
# RETURNS: 0 / 99 assertion is true / false
|
||||||
|
#===============================================================================
|
||||||
|
function _assert ()
|
||||||
|
{
|
||||||
|
if [ ! $1 ]; then
|
||||||
|
echo "${0##*/}${2:+:$2}: assertion '$1' failed."
|
||||||
|
exit 99
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
DEBUG=${DEBUG:-0} # 0 = no debug output, 1 = show debug output,
|
||||||
|
# or enable debug with: DEBUG=1 script.sh
|
||||||
|
|
||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: _debug
|
||||||
|
# DESCRIPTION: echo debug output controlled by a global variable
|
||||||
|
# PARAMETERS: list, e.g.; "$LINENO: x=$x"
|
||||||
|
# RETURNS: always 0
|
||||||
|
#===============================================================================
|
||||||
|
_debug ()
|
||||||
|
{
|
||||||
|
[ ${DEBUG} -ne 0 ] && echo -e "${@}"
|
||||||
|
return 0
|
||||||
|
} # ---------- end of function _debug ----------
|
@ -0,0 +1,3 @@
|
|||||||
|
# print the positional parameters
|
||||||
|
printf "'%b'\n" "$0" "$@" | nl -v0 -s': '
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
DEBUG=${DEBUG:-0} # 0 = no debug output, 1 = show debug output,
|
||||||
|
# or enable debug with: DEBUG=1 script.sh
|
||||||
|
|
||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: _debug_timestamp
|
||||||
|
# DESCRIPTION: timestamp + optional information
|
||||||
|
# timestamp: {seconds since 1970-01-01 00:00:00}.{nanoseconds}
|
||||||
|
# PARAMETERS: identification, e.g. $LINENO (optional)
|
||||||
|
# RETURNS: always 0
|
||||||
|
#===============================================================================
|
||||||
|
_debug_timestamp ()
|
||||||
|
{
|
||||||
|
[ ${DEBUG} -ne 0 ] && echo -e "[ $(date "+%s.%N") ]${@:+ -- ${@}}"
|
||||||
|
return 0
|
||||||
|
} # ---------- end of function _debug_timestamp ----------
|
@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
#==========================================================================
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#==========================================================================
|
||||||
|
#
|
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
timestamp=$(date +"%Y%m%d-%H%M%S") # generate timestamp : YYYYMMDD-hhmmss
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
ScriptVersion="1.0"
|
||||||
|
|
||||||
|
#=== FUNCTION ================================================================
|
||||||
|
# NAME: usage
|
||||||
|
# DESCRIPTION: Display usage information.
|
||||||
|
#===============================================================================
|
||||||
|
function usage ()
|
||||||
|
{
|
||||||
|
cat <<- EOT
|
||||||
|
|
||||||
|
Usage : ${0##/*/} [options] [--]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h|help Display this message
|
||||||
|
-v|version Display script version
|
||||||
|
|
||||||
|
EOT
|
||||||
|
} # ---------- end of function usage ----------
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# Handle command line arguments
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
while getopts ":hv" opt
|
||||||
|
do
|
||||||
|
case $opt in
|
||||||
|
|
||||||
|
h|help ) usage; exit 0 ;;
|
||||||
|
|
||||||
|
v|version ) echo "$0 -- Version $ScriptVersion"; exit 0 ;;
|
||||||
|
|
||||||
|
\? ) echo -e "\n Option does not exist : $OPTARG\n"
|
||||||
|
usage; exit 1 ;;
|
||||||
|
|
||||||
|
esac # --- end of case ---
|
||||||
|
done
|
||||||
|
shift $(($OPTIND-1))
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
infilename="" # input filename
|
||||||
|
|
||||||
|
exec 3<"$infilename"
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo -e "Could not link file descriptor with file '$infilename'\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while read line <&3 ; do
|
||||||
|
echo -e "$line"
|
||||||
|
done
|
||||||
|
|
||||||
|
exec 3<&- # close file descriptor
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
outfilename="" # output filename
|
||||||
|
|
||||||
|
exec 4>"$outfilename"
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo -e "Could not link file descriptor with file '$outfilename'\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "text" >&4
|
||||||
|
|
||||||
|
exec 4>&- # close file descriptor
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
set -o nounset # treat unset variables as errors
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
# GLOBAL DECLARATIONS
|
||||||
|
#===============================================================================
|
||||||
|
declare -rx SCRIPT=${0##*/} # the name of this script
|
||||||
|
declare -rx mkdir='/bin/mkdir' # the mkdir(1) command
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
# SANITY CHECKS
|
||||||
|
#===============================================================================
|
||||||
|
if [ -z "$BASH" ] ; then
|
||||||
|
printf "$SCRIPT:$LINENO: run this script with the BASH shell\n" >&2
|
||||||
|
exit 192
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$mkdir" ] ; then
|
||||||
|
printf "$SCRIPT:$LINENO: command '$mkdir' not available - aborting\n" >&2
|
||||||
|
exit 192
|
||||||
|
fi
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
# MAIN SCRIPT
|
||||||
|
#===============================================================================
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
# STATISTICS / CLEANUP
|
||||||
|
#===============================================================================
|
||||||
|
exit 0
|
@ -0,0 +1,9 @@
|
|||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# set Bash prompts
|
||||||
|
# PS4 shows the function name when execution is inside a function and
|
||||||
|
# the xtrace option is set.
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
export PS2='continue> '
|
||||||
|
export PS3='choose: '
|
||||||
|
export PS4='|${BASH_SOURCE} ${LINENO}${FUNCNAME[0]:+ ${FUNCNAME[0]}()}| '
|
||||||
|
|
@ -0,0 +1,63 @@
|
|||||||
|
"===============================================================================
|
||||||
|
"
|
||||||
|
" File: customization.gvimrc
|
||||||
|
"
|
||||||
|
" Description: suggestion for a personal configuration file ~/.gvimrc
|
||||||
|
"
|
||||||
|
" VIM Version: 7.0+
|
||||||
|
" Author: Dr. Fritz Mehner (fgm), mehner.fritz@fh-swf.de
|
||||||
|
" Organization: FH Südwestfalen, Iserlohn
|
||||||
|
" Version: 1.0
|
||||||
|
" Created: 18.05.2013 21:58
|
||||||
|
" Revision: ---
|
||||||
|
" License: Copyright (c) 2013, Dr. Fritz Mehner
|
||||||
|
"===============================================================================
|
||||||
|
"
|
||||||
|
"===============================================================================
|
||||||
|
" GENERAL SETTINGS
|
||||||
|
"===============================================================================
|
||||||
|
set cmdheight=2 " Make command line two lines high
|
||||||
|
set mousehide " Hide the mouse when typing text
|
||||||
|
|
||||||
|
highlight Normal guibg=grey90
|
||||||
|
highlight Cursor guibg=Blue guifg=NONE
|
||||||
|
highlight lCursor guibg=Cyan guifg=NONE
|
||||||
|
highlight NonText guibg=grey80
|
||||||
|
highlight Constant gui=NONE guibg=grey95
|
||||||
|
highlight Special gui=NONE guibg=grey95
|
||||||
|
"
|
||||||
|
let c_comment_strings=1 " highlight strings inside C comments
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Moving cursor to other windows
|
||||||
|
"
|
||||||
|
" shift down : change window focus to lower one (cyclic)
|
||||||
|
" shift up : change window focus to upper one (cyclic)
|
||||||
|
" shift left : change window focus to one on left
|
||||||
|
" shift right : change window focus to one on right
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
nnoremap <s-down> <c-w>w
|
||||||
|
nnoremap <s-up> <c-w>W
|
||||||
|
nnoremap <s-left> <c-w>h
|
||||||
|
nnoremap <s-right> <c-w>l
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" some additional hot keys
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" S-F3 - call gvim file browser
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
noremap <silent> <s-F3> :silent browse confirm e<CR>
|
||||||
|
inoremap <silent> <s-F3> <Esc>:silent browse confirm e<CR>
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" toggle insert mode <--> 'normal mode with the <RightMouse>-key
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
"
|
||||||
|
nnoremap <RightMouse> <Insert>
|
||||||
|
inoremap <RightMouse> <ESC>
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" use font with clearly distinguishable brackets : ()[]{}
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
"set guifont=Luxi\ Mono\ 14
|
||||||
|
"
|
@ -0,0 +1,210 @@
|
|||||||
|
"===============================================================================
|
||||||
|
"
|
||||||
|
" File: customization.vimrc
|
||||||
|
"
|
||||||
|
" Description: suggestion for a personal configuration file ~/.vimrc
|
||||||
|
"
|
||||||
|
" VIM Version: 7.0+
|
||||||
|
" Author: Dr. Fritz Mehner (fgm), mehner.fritz@fh-swf.de
|
||||||
|
" Organization: FH Südwestfalen, Iserlohn
|
||||||
|
" Version: 1.0
|
||||||
|
" Created: 18.05.2013 21:59
|
||||||
|
" Revision: ---
|
||||||
|
" License: Copyright (c) 2013, Dr. Fritz Mehner
|
||||||
|
"===============================================================================
|
||||||
|
|
||||||
|
"
|
||||||
|
"===============================================================================
|
||||||
|
" GENERAL SETTINGS
|
||||||
|
"===============================================================================
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Use Vim settings, rather then Vi settings.
|
||||||
|
" This must be first, because it changes other options as a side effect.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
set nocompatible
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Enable file type detection. Use the default filetype settings.
|
||||||
|
" Also load indent files, to automatically do language-dependent indenting.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
filetype plugin on
|
||||||
|
filetype indent on
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Switch syntax highlighting on.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
syntax on
|
||||||
|
"
|
||||||
|
" Platform specific items:
|
||||||
|
" - central backup directory (has to be created)
|
||||||
|
" - default dictionary
|
||||||
|
" Uncomment your choice.
|
||||||
|
if has("win16") || has("win32") || has("win64") ||
|
||||||
|
\ has("win95") || has("win32unix")
|
||||||
|
"
|
||||||
|
" runtime mswin.vim
|
||||||
|
" set backupdir =$VIM\vimfiles\backupdir
|
||||||
|
" set dictionary=$VIM\vimfiles\wordlists/german.list
|
||||||
|
else
|
||||||
|
" set backupdir =$HOME/.vim.backupdir
|
||||||
|
" set dictionary=$HOME/.vim/wordlists/german.list
|
||||||
|
endif
|
||||||
|
"
|
||||||
|
" Using a backupdir under UNIX/Linux: you may want to include a line similar to
|
||||||
|
" find $HOME/.vim.backupdir -name "*" -type f -mtime +60 -exec rm -f {} \;
|
||||||
|
" in one of your shell startup files (e.g. $HOME/.profile)
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Various settings
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
set autoindent " copy indent from current line
|
||||||
|
set autoread " read open files again when changed outside Vim
|
||||||
|
set autowrite " write a modified buffer on each :next , ...
|
||||||
|
set backspace=indent,eol,start " backspacing over everything in insert mode
|
||||||
|
set backup " keep a backup file
|
||||||
|
set browsedir=current " which directory to use for the file browser
|
||||||
|
set complete+=k " scan the files given with the 'dictionary' option
|
||||||
|
set history=50 " keep 50 lines of command line history
|
||||||
|
set hlsearch " highlight the last used search pattern
|
||||||
|
set incsearch " do incremental searching
|
||||||
|
set listchars=tab:>.,eol:\$ " strings to use in 'list' mode
|
||||||
|
set mouse=a " enable the use of the mouse
|
||||||
|
set nowrap " do not wrap lines
|
||||||
|
set popt=left:8pc,right:3pc " print options
|
||||||
|
set ruler " show the cursor position all the time
|
||||||
|
set shiftwidth=2 " number of spaces to use for each step of indent
|
||||||
|
set showcmd " display incomplete commands
|
||||||
|
set smartindent " smart autoindenting when starting a new line
|
||||||
|
set tabstop=2 " number of spaces that a <Tab> counts for
|
||||||
|
set visualbell " visual bell instead of beeping
|
||||||
|
set wildignore=*.bak,*.o,*.e,*~ " wildmenu: ignore these extensions
|
||||||
|
set wildmenu " command-line completion in an enhanced mode
|
||||||
|
"
|
||||||
|
"===================================================================================
|
||||||
|
" BUFFERS, WINDOWS
|
||||||
|
"===================================================================================
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" The current directory is the directory of the file in the current window.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
if has("autocmd")
|
||||||
|
autocmd BufNewFile,BufRead * :lchdir %:p:h
|
||||||
|
endif
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" close window (conflicts with the KDE setting for calling the process manager)
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
noremap <C-Esc> :close<CR>
|
||||||
|
inoremap <C-Esc> <C-C>:close<CR>
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Fast switching between buffers
|
||||||
|
" The current buffer will be saved before switching to the next one.
|
||||||
|
" Choose :bprevious or :bnext
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
noremap <silent> <s-tab> :if &modifiable && !&readonly &&
|
||||||
|
\ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
|
||||||
|
inoremap <silent> <s-tab> <C-C>:if &modifiable && !&readonly &&
|
||||||
|
\ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Leave the editor with Ctrl-q (KDE): Write all changed buffers and exit Vim
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
nnoremap <C-q> :wqall<CR>
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" When editing a file, always jump to the last known cursor position.
|
||||||
|
" Don't do it when the position is invalid or when inside an event handler
|
||||||
|
" (happens when dropping a file on gvim).
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
if has("autocmd")
|
||||||
|
autocmd BufReadPost *
|
||||||
|
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||||
|
\ exe "normal! g`\"" |
|
||||||
|
\ endif
|
||||||
|
endif " has("autocmd")
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" some additional hot keys
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" F2 - write file without confirmation
|
||||||
|
" F3 - call file explorer Ex
|
||||||
|
" F4 - show tag under curser in the preview window (tagfile must exist!)
|
||||||
|
" F5 - open quickfix error window
|
||||||
|
" F6 - close quickfix error window
|
||||||
|
" F7 - display previous error
|
||||||
|
" F8 - display next error
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
"
|
||||||
|
noremap <silent> <F2> :write<CR>
|
||||||
|
noremap <silent> <F3> :Explore<CR>
|
||||||
|
nnoremap <silent> <F4> :exe ":ptag ".expand("<cword>")<CR>
|
||||||
|
noremap <silent> <F5> :copen<CR>
|
||||||
|
noremap <silent> <F6> :cclose<CR>
|
||||||
|
noremap <silent> <F7> :cp<CR>
|
||||||
|
noremap <silent> <F8> :cn<CR>
|
||||||
|
"
|
||||||
|
inoremap <silent> <F2> <Esc>:write<CR>
|
||||||
|
inoremap <silent> <F3> <Esc>:Explore<CR>
|
||||||
|
inoremap <silent> <F4> <Esc>:exe ":ptag ".expand("<cword>")<CR>
|
||||||
|
inoremap <silent> <F5> <Esc>:copen<CR>
|
||||||
|
inoremap <silent> <F6> <Esc>:cclose<CR>
|
||||||
|
inoremap <silent> <F7> <Esc>:cp<CR>
|
||||||
|
inoremap <silent> <F8> <Esc>:cn<CR>
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" autocomplete parenthesis, brackets and braces
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
inoremap ( ()<Left>
|
||||||
|
inoremap [ []<Left>
|
||||||
|
inoremap { {}<Left>
|
||||||
|
"
|
||||||
|
vnoremap ( s()<Esc>P
|
||||||
|
vnoremap [ s[]<Esc>P
|
||||||
|
vnoremap { s{}<Esc>P
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" autocomplete quotes
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
vnoremap ' s''<Esc>P<Right>
|
||||||
|
vnoremap " s""<Esc>P<Right>
|
||||||
|
vnoremap ` s``<Esc>P<Right>
|
||||||
|
"
|
||||||
|
inoremap ' '<Esc>:call QuoteInsertionWrapper("'")<CR>a
|
||||||
|
inoremap " "<Esc>:call QuoteInsertionWrapper('"')<CR>a
|
||||||
|
inoremap ` `<Esc>:call QuoteInsertionWrapper('`')<CR>a
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" function QuoteInsertionWrapper {{{3
|
||||||
|
"
|
||||||
|
" Add a second quote only if the left and the right character are not keyword
|
||||||
|
" characters and the right character is not the same quote.
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
function! QuoteInsertionWrapper (quote)
|
||||||
|
let col = col('.')
|
||||||
|
let line = getline('.')
|
||||||
|
if ( line[col-2] =~ '\k' )
|
||||||
|
\ || ( line[col ] =~ '\k' )
|
||||||
|
\ || ( line[col-2] =~ a:quote )
|
||||||
|
\ || ( line[col ] =~ a:quote )
|
||||||
|
return a:quote
|
||||||
|
else
|
||||||
|
return a:quote.a:quote."\<Left>"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
"
|
||||||
|
"===============================================================================
|
||||||
|
" VARIOUS PLUGIN CONFIGURATIONS
|
||||||
|
"===============================================================================
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" plugin bash-support.vim
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" --empty --
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" taglist.vim : toggle the taglist window
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
noremap <silent> <F11> <Esc><Esc>:Tlist<CR>
|
||||||
|
inoremap <silent> <F11> <Esc><Esc>:Tlist<CR>
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ User Macros
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
SetMacro( 'AUTHOR', 'YOUR NAME' )
|
||||||
|
SetMacro( 'AUTHORREF', '' )
|
||||||
|
SetMacro( 'COMPANY', '' )
|
||||||
|
SetMacro( 'COPYRIGHT', 'Copyright (c) |YEAR|, |AUTHOR|' )
|
||||||
|
SetMacro( 'EMAIL', '' )
|
||||||
|
SetMacro( 'LICENSE', 'GNU General Public License' )
|
||||||
|
SetMacro( 'ORGANIZATION','' )
|
||||||
|
|
||||||
|
§ =============================================================
|
||||||
|
§ File Includes and Shortcuts
|
||||||
|
§ =============================================================
|
||||||
|
|
35
.config/nvim/plugged/bash-support.vim/bash-support/rc/sh.vim
Normal file
35
.config/nvim/plugged/bash-support.vim/bash-support/rc/sh.vim
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
"===============================================================================
|
||||||
|
"
|
||||||
|
" File: sh.vim
|
||||||
|
"
|
||||||
|
" Description: Additonal maps for bash-support (version 4.0+)
|
||||||
|
"
|
||||||
|
" VIM Version: 7.0+
|
||||||
|
" Author: Dr. Fritz Mehner (fgm), mehner.fritz@fh-swf.de
|
||||||
|
" Organization: FH Südwestfalen, Iserlohn
|
||||||
|
" Version: 1.0
|
||||||
|
" Created: 20.05.2013 17:20
|
||||||
|
" Revision: ---
|
||||||
|
" License: Copyright (c) 2013, Dr. Fritz Mehner
|
||||||
|
"===============================================================================
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" additional mapping : single quotes around a Word (non-whitespaces)
|
||||||
|
" masks the normal mode command '' (jump to the position
|
||||||
|
" before the latest jump)
|
||||||
|
" additional mapping : double quotes around a Word (non-whitespaces)
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
nnoremap <buffer> '' ciW''<Esc>P
|
||||||
|
nnoremap <buffer> "" ciW""<Esc>P
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" generate tests
|
||||||
|
" additional mapping : \t1 expands to [ -<CURSOR> ]
|
||||||
|
" additional mapping : \t2 expands to [ <CURSOR> - ]
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
nnoremap <buffer> <silent> <LocalLeader>t1 a[ - ]<Left><Left><Left>
|
||||||
|
inoremap <buffer> <silent> <LocalLeader>t1 [ - ]<Left><Left><Left>
|
||||||
|
"
|
||||||
|
nnoremap <buffer> <silent> <LocalLeader>t2 a[ - ]<Left><Left><Left><Left><Left>
|
||||||
|
inoremap <buffer> <silent> <LocalLeader>t2 [ - ]<Left><Left><Left><Left><Left>
|
||||||
|
"
|
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#===============================================================================
|
||||||
|
# FILE: wrapper.sh
|
||||||
|
# USAGE: ./wrapper.sh scriptname [cmd-line-args]
|
||||||
|
# DESCRIPTION: Wraps the execution of a programm or script.
|
||||||
|
# Use with xterm: xterm -e wrapper.sh scriptname cmd-line-args
|
||||||
|
# This script is used by the Vim plugin bash-support.vim
|
||||||
|
# OPTIONS: ---
|
||||||
|
# REQUIREMENTS: ---
|
||||||
|
# BUGS: ---
|
||||||
|
# NOTES: ---
|
||||||
|
# AUTHOR: Dr.-Ing. Fritz Mehner (fgm), mehner.fritz@fh-swf.de
|
||||||
|
# COMPANY: Fachhochschule Südwestfalen, Iserlohn
|
||||||
|
# CREATED: 23.11.2004 18:04:01 CET
|
||||||
|
# REVISION: ---
|
||||||
|
#===============================================================================
|
||||||
|
|
||||||
|
scriptname="${1}" # name of the script to execute
|
||||||
|
returncode=0 # default return code
|
||||||
|
|
||||||
|
if [ ${#} -ge 1 ] ; then
|
||||||
|
if [ -x "$scriptname" ] ; then # start an executable script?
|
||||||
|
"${@}"
|
||||||
|
else
|
||||||
|
$SHELL "${@}" # start a script which is not executable
|
||||||
|
fi
|
||||||
|
returncode=$?
|
||||||
|
[ $returncode -ne 0 ] && printf "'${@}' returned ${returncode}\n"
|
||||||
|
else
|
||||||
|
printf "\n!! ${0} : no argument(s) !!\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -p "... press return key ... " dummy
|
||||||
|
exit $returncode
|
@ -0,0 +1,42 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ User Macros
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
SetMacro( 'AUTHOR', 'Marcin Woźniak' )
|
||||||
|
SetMacro( 'AUTHORREF', '' )
|
||||||
|
SetMacro( 'COMPANY', 'Cognifide Polska' )
|
||||||
|
SetMacro( 'COPYRIGHT', '' )
|
||||||
|
SetMacro( 'EMAIL', 'marcin.wozniak@cognifide.com' )
|
||||||
|
SetMacro( 'LICENSE', '' )
|
||||||
|
SetMacro( 'ORGANIZATION','' )
|
||||||
|
|
||||||
|
SetFormat( 'DATE', '%x' )
|
||||||
|
SetFormat( 'TIME', '%H:%M' )
|
||||||
|
SetFormat( 'YEAR', '%Y' )
|
||||||
|
|
||||||
|
SetStyle( 'default' )
|
||||||
|
|
||||||
|
§ =============================================================
|
||||||
|
§ File Includes and Shortcuts
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
§ :TODO:14.07.13 12:50:WM: files "paramsub.templates" and "io-redirection.templates": maps, shortcuts? sort alphabetically?
|
||||||
|
|
||||||
|
MenuShortcut( 'Comments', 'c' )
|
||||||
|
MenuShortcut( 'Statements', 's' )
|
||||||
|
MenuShortcut( 'Tests', 't' )
|
||||||
|
MenuShortcut( 'ParamSub', 'p' )
|
||||||
|
MenuShortcut( 'PatternMatching', 'p' )
|
||||||
|
MenuShortcut( 'IO-Redir', 'i' )
|
||||||
|
|
||||||
|
IncludeFile( 'comments.templates' )
|
||||||
|
IncludeFile( 'statements.templates' )
|
||||||
|
IncludeFile( 'tests.templates' )
|
||||||
|
IncludeFile( 'paramsub.templates' )
|
||||||
|
IncludeFile( 'specialparams.templates' )
|
||||||
|
IncludeFile( 'environment.templates' )
|
||||||
|
IncludeFile( 'builtins.templates' )
|
||||||
|
IncludeFile( 'set.templates' )
|
||||||
|
IncludeFile( 'shelloptions.templates' )
|
||||||
|
IncludeFile( 'io-redirection.templates' )
|
||||||
|
IncludeFile( 'patternmatching.templates' )
|
@ -0,0 +1,70 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Builtins
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: builtins == list ==
|
||||||
|
'alias',
|
||||||
|
'bg',
|
||||||
|
'bind',
|
||||||
|
'break',
|
||||||
|
'builtin',
|
||||||
|
'caller',
|
||||||
|
'cd',
|
||||||
|
'command',
|
||||||
|
'compgen',
|
||||||
|
'complete',
|
||||||
|
'continue',
|
||||||
|
'compopt',
|
||||||
|
'declare',
|
||||||
|
'dirs',
|
||||||
|
'disown',
|
||||||
|
'echo',
|
||||||
|
'enable',
|
||||||
|
'eval',
|
||||||
|
'exec',
|
||||||
|
'exit',
|
||||||
|
'export',
|
||||||
|
'false',
|
||||||
|
'fc',
|
||||||
|
'fg',
|
||||||
|
'getopts',
|
||||||
|
'hash',
|
||||||
|
'help',
|
||||||
|
'history',
|
||||||
|
'jobs',
|
||||||
|
'kill',
|
||||||
|
'let',
|
||||||
|
'local',
|
||||||
|
'logout',
|
||||||
|
'mapfile',
|
||||||
|
'popd',
|
||||||
|
'printf',
|
||||||
|
'pushd',
|
||||||
|
'pwd',
|
||||||
|
'read',
|
||||||
|
'readarray',
|
||||||
|
'readonly',
|
||||||
|
'return',
|
||||||
|
'set',
|
||||||
|
'shift',
|
||||||
|
'shopt',
|
||||||
|
'source',
|
||||||
|
'suspend',
|
||||||
|
'test',
|
||||||
|
'times',
|
||||||
|
'trap',
|
||||||
|
'true',
|
||||||
|
'type',
|
||||||
|
'typeset',
|
||||||
|
'ulimit',
|
||||||
|
'umask',
|
||||||
|
'unalias',
|
||||||
|
'unset',
|
||||||
|
'wait',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Builtins == expandmenu, insert, map:bbu, sc:b ==
|
||||||
|
|PickList( 'Builtins', 'builtins' )|
|
||||||
|
|PICK|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
@ -0,0 +1,142 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Comments
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== Comments.end-of-line comment == nomenu, append ==
|
||||||
|
# <CURSOR>
|
||||||
|
== Comments.frame == map:cfr, sc:r ==
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# <CURSOR>
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
== Comments.function == map:cfu, sc:f ==
|
||||||
|
#--- FUNCTION ----------------------------------------------------------------
|
||||||
|
# NAME: |?FUNCTION_NAME|
|
||||||
|
# DESCRIPTION: <CURSOR>
|
||||||
|
# PARAMETERS:
|
||||||
|
# RETURNS:
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
== Comments.file header == start, map:ch ==
|
||||||
|
#!/bin/bash -
|
||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
# FILE: |FILENAME|
|
||||||
|
#
|
||||||
|
# USAGE: ./|FILENAME|
|
||||||
|
#
|
||||||
|
# DESCRIPTION:
|
||||||
|
#
|
||||||
|
# OPTIONS: ---
|
||||||
|
# REQUIREMENTS: ---
|
||||||
|
# BUGS: ---
|
||||||
|
# NOTES: ---
|
||||||
|
# AUTHOR: |AUTHOR| , |EMAIL|
|
||||||
|
# COMPANY: |COMPANY|
|
||||||
|
# CREATED: |DATE| |TIME|
|
||||||
|
# REVISION: ---
|
||||||
|
#===============================================================================
|
||||||
|
|
||||||
|
set -o nounset # Treat unset variables as an error
|
||||||
|
|
||||||
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)/"
|
||||||
|
#source $DIR/settings.sh
|
||||||
|
|
||||||
|
#####################
|
||||||
|
# SETTINGS FILE
|
||||||
|
EMAILSERVER=""
|
||||||
|
EMAILFROM=""
|
||||||
|
EMAILADMIN=""
|
||||||
|
ERRORTITLE=Error-$TITLE
|
||||||
|
#
|
||||||
|
#####################
|
||||||
|
|
||||||
|
LOG="$DIR/log"
|
||||||
|
LOG_FILE="$LOG/log-$(date -I).log"
|
||||||
|
|
||||||
|
function timestamp(){
|
||||||
|
echo "[+] "$(date +'%F %T')" [INFO] $@"
|
||||||
|
}
|
||||||
|
|
||||||
|
function err() {
|
||||||
|
echo "[-] "$(date +'%F %T')" [ERROR] $@" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
function command_start(){
|
||||||
|
timestamp "Command $1 has been started."
|
||||||
|
if ! $1 ; then
|
||||||
|
err "Command $1 went wrong."
|
||||||
|
sendmailerr
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function removelogs(){
|
||||||
|
find $LOG -mindepth 1 -mtime +365 -delete
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendmailerr (){
|
||||||
|
echo -e "SERVER-IP: :$(ifconfig | awk '/inet /{print $2}' | sed '/127.0.0.1/d'| tr '\n' ' ')\nSCRIPTNAME: $(basename "$0")" | mailx -v -S smtp=$EMAILSERVER -r $EMAILFROM -s "$ERRORTITLE" -a $LOG_FILE $EMAILADMIN
|
||||||
|
}
|
||||||
|
|
||||||
|
function main(){
|
||||||
|
timestamp "Script has been started"
|
||||||
|
timestamp "Everything looks OK ;-)"
|
||||||
|
}
|
||||||
|
|
||||||
|
main >>$LOG_FILE 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
§ -------------------------------------------------------------
|
||||||
|
|
||||||
|
== Comments.date == insert, map:cd, sc:d ==
|
||||||
|
|DATE|<CURSOR>
|
||||||
|
== Comments.date+time == insert, map:ct, sc:t ==
|
||||||
|
|DATE| |TIME|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
§ -------------------------------------------------------------
|
||||||
|
§ Keywords, Special and Macros
|
||||||
|
§ -------------------------------------------------------------
|
||||||
|
|
||||||
|
== LIST: comments_sections == hash ==
|
||||||
|
'GLOBAL DECLARATIONS' : 'GLOBAL DECLARATIONS',
|
||||||
|
'COMMAND LINE PROCESSING' : 'COMMAND LINE PROCESSING',
|
||||||
|
'SANITY CHECKS' : 'SANITY CHECKS',
|
||||||
|
'FUNCTION DEFINITIONS' : 'FUNCTION DEFINITIONS',
|
||||||
|
'TRAPS' : 'TRAPS',
|
||||||
|
'MAIN SCRIPT' : 'MAIN SCRIPT',
|
||||||
|
'STATISTICS AND CLEAN-UP' : 'STATISTICS AND CLEAN-UP',
|
||||||
|
== LIST: comments_keywords == hash ==
|
||||||
|
'bug' : ':BUG:|DATE| |TIME|:|AUTHORREF|: <CURSOR>',
|
||||||
|
'todo' : ':TODO:|DATE| |TIME|:|AUTHORREF|: <CURSOR>',
|
||||||
|
'tricky' : ':TRICKY:|DATE| |TIME|:|AUTHORREF|: <CURSOR>',
|
||||||
|
'warning' : ':WARNING:|DATE| |TIME|:|AUTHORREF|: <CURSOR>',
|
||||||
|
'workaround' : ':WORKAROUND:|DATE| |TIME|:|AUTHORREF|: <CURSOR>',
|
||||||
|
'new keyword' : ':<CURSOR>:|DATE| |TIME|:|AUTHORREF|: {+COMMENT+}',
|
||||||
|
== LIST: comments_macros == hash ==
|
||||||
|
'AUTHOR' : '|AUTHOR|',
|
||||||
|
'AUTHORREF' : '|AUTHORREF|',
|
||||||
|
'COMPANY' : '|COMPANY|',
|
||||||
|
'COPYRIGHT' : '|COPYRIGHT|',
|
||||||
|
'EMAIL' : '|EMAIL|',
|
||||||
|
'ORGANIZATION' : '|ORGANIZATION|',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
§ -------------------------------------------------------------
|
||||||
|
|
||||||
|
== Comments.script sections == expandmenu, map:css, sc:s ==
|
||||||
|
|PickList( 'script sections', 'comments_sections' )|
|
||||||
|
#===============================================================================
|
||||||
|
# |PICK|
|
||||||
|
#===============================================================================
|
||||||
|
== Comments.keyword comments == expandmenu, append, map:ckc, sc:k ==
|
||||||
|
|PickList( 'keyword comment', 'comments_keywords' )|
|
||||||
|
# |PICK|
|
||||||
|
== Comments.macros == expandmenu, insert, map:cma, sc:m ==
|
||||||
|
|PickList( 'macro', 'comments_macros' )|
|
||||||
|
|PICK|
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== SEP: Comments.sep1 ==
|
@ -0,0 +1,100 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Environment
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: environment == list ==
|
||||||
|
'BASH',
|
||||||
|
'BASHOPTS',
|
||||||
|
'BASHPID',
|
||||||
|
'BASH_ALIASES',
|
||||||
|
'BASH_ARGC',
|
||||||
|
'BASH_ARGV',
|
||||||
|
'BASH_CMDS',
|
||||||
|
'BASH_COMMAND',
|
||||||
|
'BASH_ENV',
|
||||||
|
'BASH_EXECUTION_STRING',
|
||||||
|
'BASH_LINENO',
|
||||||
|
'BASH_REMATCH',
|
||||||
|
'BASH_SOURCE',
|
||||||
|
'BASH_SUBSHELL',
|
||||||
|
'BASH_VERSINFO',
|
||||||
|
'BASH_VERSION',
|
||||||
|
'BASH_XTRACEFD',
|
||||||
|
'CDPATH',
|
||||||
|
'COLUMNS',
|
||||||
|
'COMPREPLY',
|
||||||
|
'COMP_CWORD',
|
||||||
|
'COMP_KEY',
|
||||||
|
'COMP_LINE',
|
||||||
|
'COMP_POINT',
|
||||||
|
'COMP_TYPE',
|
||||||
|
'COMP_WORDBREAKS',
|
||||||
|
'COMP_WORDS',
|
||||||
|
'DIRSTACK',
|
||||||
|
'EMAC&S',
|
||||||
|
'EUID',
|
||||||
|
'FCEDIT',
|
||||||
|
'FIGNORE',
|
||||||
|
'FUNCNAME',
|
||||||
|
'FUNCNEST',
|
||||||
|
'GLOBIGNORE',
|
||||||
|
'GROUPS',
|
||||||
|
'HISTCMD',
|
||||||
|
'HISTCONTROL',
|
||||||
|
'HISTFILE',
|
||||||
|
'HISTFILESIZE',
|
||||||
|
'HISTIGNORE',
|
||||||
|
'HISTSIZE',
|
||||||
|
'HISTTIMEFORMAT',
|
||||||
|
'HOME',
|
||||||
|
'HOSTFILE',
|
||||||
|
'HOSTNAME',
|
||||||
|
'HOSTTYPE',
|
||||||
|
'IFS',
|
||||||
|
'IGNOREEOF',
|
||||||
|
'INPUTRC',
|
||||||
|
'LANG',
|
||||||
|
'LC_ALL',
|
||||||
|
'LC_COLLATE',
|
||||||
|
'LC_CTYPE',
|
||||||
|
'LC_MESSAGES',
|
||||||
|
'LC_NUMERIC',
|
||||||
|
'LINENO',
|
||||||
|
'LINES',
|
||||||
|
'MACHTYPE',
|
||||||
|
'MAIL',
|
||||||
|
'MAILCHECK',
|
||||||
|
'MAILPATH',
|
||||||
|
'OLDPWD',
|
||||||
|
'OPTARG',
|
||||||
|
'OPTERR',
|
||||||
|
'OPTIND',
|
||||||
|
'OSTYPE',
|
||||||
|
'PATH',
|
||||||
|
'PIPESTATUS',
|
||||||
|
'POSIXLY_CORRECT',
|
||||||
|
'PPID',
|
||||||
|
'PROMPT_COMMAND',
|
||||||
|
'PROMPT_DIRTRIM',
|
||||||
|
'PS1',
|
||||||
|
'PS2',
|
||||||
|
'PS3',
|
||||||
|
'PS4',
|
||||||
|
'PWD',
|
||||||
|
'RANDOM',
|
||||||
|
'REPLY',
|
||||||
|
'SECONDS',
|
||||||
|
'SHELL',
|
||||||
|
'SHELLOPTS',
|
||||||
|
'SHLVL',
|
||||||
|
'TIMEFORMAT',
|
||||||
|
'TMOUT',
|
||||||
|
'TMPDIR',
|
||||||
|
'UID',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Environment == expandmenu, insert, map:ben, sc:e ==
|
||||||
|
|PickList( 'Environment', 'environment' )|
|
||||||
|
|PICK|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ IO Redirection
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: IORedirection == hash ==
|
||||||
|
'append STDOUT and STDERR &>>': ' &>> <CURSOR>',
|
||||||
|
'close input from file descr n n<&-': ' <CURSOR><&- ',
|
||||||
|
'close output from file descr n n>&-': ' <CURSOR>>&- ',
|
||||||
|
'close STDIN <&-': ' <&- <CURSOR>',
|
||||||
|
'close STDOUT >&-': ' >&- <CURSOR>',
|
||||||
|
'direct file descr n to file, append n>>' : ' <CURSOR>>> ',
|
||||||
|
'direct file descr n to file n>' : ' <CURSOR>> ',
|
||||||
|
'direct STDOUT and STDERR to file &>' : ' &> <CURSOR>',
|
||||||
|
'direct STDOUT to file, append >>' : ' >> <CURSOR>',
|
||||||
|
'direct STDOUT to file >' : ' > <CURSOR>',
|
||||||
|
'direct STDOUT to STDERR >&2' : ' >&2<CURSOR>',
|
||||||
|
'duplicate STDIN from file descr n n<&' : ' <<CURSOR>& ',
|
||||||
|
'duplicate STDOUT to file descr n n>&' : ' ><CURSOR>& ',
|
||||||
|
'take file descr n from file n<' : ' <CURSOR>< ',
|
||||||
|
'take STDIN from file <' : ' < <CURSOR>',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== IO-Redir.redir == expandmenu, insert, sc:r, map:ior ==
|
||||||
|
|PickList( 'IO-Redir', 'IORedirection' )|
|
||||||
|
|PICK|
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== IO-Redir.here-document == insert, sc:h, map:ioh ==
|
||||||
|
<<-EOF
|
||||||
|
<SPLIT><CURSOR>
|
||||||
|
EOF
|
||||||
|
== ENDTEMPLATE ==
|
@ -0,0 +1,33 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Parameter Substitution
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: ParameterSubstitution == hash ==
|
||||||
|
'all lower to upper ${ ^^ }' : '${<CURSOR>^^<+pattern+>}',
|
||||||
|
'all upper to lower ${ ,, }' : '${<CURSOR>,,<+pattern+>}',
|
||||||
|
'assign default value ${ := }' : '${<CURSOR>:=<+word+>}',
|
||||||
|
'display error ${ :? }' : '${<CURSOR>:?<+word+>}',
|
||||||
|
'first lower to upper ${ ^ }' : '${<CURSOR>^<+pattern+>}',
|
||||||
|
'first upper to lower ${ , }' : '${<CURSOR>,<+pattern+>}',
|
||||||
|
'indirect parameter expansion ${! }' : '${!<CURSOR>}',
|
||||||
|
'names matching prefix ${! *}' : '${!<CURSOR>*}',
|
||||||
|
'parameter length ${# }' : '${#<CURSOR>}',
|
||||||
|
'pattern substitution all ${ // / }' : '${<CURSOR>//<+pattern+>/<+string+>}',
|
||||||
|
'pattern substitution begin ${ /# / }' : '${<CURSOR>/#<+pattern+>/<+string+>}',
|
||||||
|
'pattern substitution ${ / / }' : '${<CURSOR>/<+pattern+>/<+string+>}',
|
||||||
|
'pattern substitution end ${ /% / }' : '${<CURSOR>/%<+pattern+>/<+string+>}',
|
||||||
|
'remove all matching prefix pattern ${ ## }' : '${<CURSOR>##<+word+>}',
|
||||||
|
'remove all matching suffix pattern ${ %% }' : '${<CURSOR>%%<+word+>}',
|
||||||
|
'remove matching prefix pattern ${ # }' : '${<CURSOR>#<+word+>}',
|
||||||
|
'remove matching suffix pattern ${ % }' : '${<CURSOR>%<+word+>}',
|
||||||
|
'substitution ${ }' : '${<SPLIT><CURSOR>}',
|
||||||
|
'substring expansion ${ : : }' : '${<CURSOR>:<+offset+>:<+length+>}',
|
||||||
|
'use alternate value ${ :+ }' : '${<CURSOR>:+<+word+>}',
|
||||||
|
'use default value ${ :- }' : '${<CURSOR>:-<+word+>}',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== ParamSub == expandmenu, insert, sc:p, map:bps ==
|
||||||
|
|PickList( 'Parameter Substitution', 'ParameterSubstitution' )|
|
||||||
|
|PICK|
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
@ -0,0 +1,51 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ RegExp
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== PatternMatching.zero or one == insert, map:pzo, sc:z ==
|
||||||
|
?(<SPLIT><CURSOR>|)
|
||||||
|
== PatternMatching.zero or more == insert, map:pzm, sc:z ==
|
||||||
|
*(<SPLIT><CURSOR>|)
|
||||||
|
== PatternMatching.one or more == insert, map:pom, sc:o ==
|
||||||
|
+(<SPLIT><CURSOR>|)
|
||||||
|
== PatternMatching.exactly one == insert, map:peo, sc:e ==
|
||||||
|
@(<SPLIT><CURSOR>|)
|
||||||
|
== PatternMatching.anything except == insert, map:pae, sc:a ==
|
||||||
|
!(<SPLIT><CURSOR>|)
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== SEP: PatternMatching.sep1 ==
|
||||||
|
|
||||||
|
== LIST: POSIX_CharClasses == list ==
|
||||||
|
'alnum',
|
||||||
|
'alpha',
|
||||||
|
'ascii',
|
||||||
|
'blank',
|
||||||
|
'cntrl',
|
||||||
|
'digit',
|
||||||
|
'graph',
|
||||||
|
'lower',
|
||||||
|
'print',
|
||||||
|
'punct',
|
||||||
|
'space',
|
||||||
|
'upper',
|
||||||
|
'word',
|
||||||
|
'xdigit',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== PatternMatching.POSIX classes == expandmenu, insert, sc:p, map:ppc ==
|
||||||
|
|PickList( 'POSIX char. classes', 'POSIX_CharClasses' )|
|
||||||
|
[:|PICK|:]<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== LIST: BashRematch == list ==
|
||||||
|
'${BASH_REMATCH[0]}',
|
||||||
|
'${BASH_REMATCH[1]}',
|
||||||
|
'${BASH_REMATCH[2]}',
|
||||||
|
'${BASH_REMATCH[3]}',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== PatternMatching.BASH_REMATCH == expandmenu, insert, sc:b, map:pbr ==
|
||||||
|
|PickList( 'BASH_REMATCH', 'BashRematch' )|
|
||||||
|
|PICK|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
@ -0,0 +1,51 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ RegExp
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== Regexp.zero or one == insert, map:xzo, sc:z ==
|
||||||
|
?(<SPLIT><CURSOR>|)
|
||||||
|
== Regexp.zero or more == insert, map:xzm, sc:z ==
|
||||||
|
*(<SPLIT><CURSOR>|)
|
||||||
|
== Regexp.one or more == insert, map:xom, sc:o ==
|
||||||
|
+(<SPLIT><CURSOR>|)
|
||||||
|
== Regexp.exactly one == insert, map:xeo, sc:e ==
|
||||||
|
@(<SPLIT><CURSOR>|)
|
||||||
|
== Regexp.anything except == insert, map:xae, sc:a ==
|
||||||
|
!(<SPLIT><CURSOR>|)
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== SEP: Regexp.sep1 ==
|
||||||
|
|
||||||
|
== LIST: POSIX_CharClasses == list ==
|
||||||
|
'alnum',
|
||||||
|
'alpha',
|
||||||
|
'ascii',
|
||||||
|
'blank',
|
||||||
|
'cntrl',
|
||||||
|
'digit',
|
||||||
|
'graph',
|
||||||
|
'lower',
|
||||||
|
'print',
|
||||||
|
'punct',
|
||||||
|
'space',
|
||||||
|
'upper',
|
||||||
|
'word',
|
||||||
|
'xdigit',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Regexp.POSIX classes == expandmenu, insert, sc:p, map:xpc ==
|
||||||
|
|PickList( 'POSIX char. classes', 'POSIX_CharClasses' )|
|
||||||
|
[:|PICK|:]<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== LIST: BashRematch == list ==
|
||||||
|
'${BASH_REMATCH[0]}',
|
||||||
|
'${BASH_REMATCH[1]}',
|
||||||
|
'${BASH_REMATCH[2]}',
|
||||||
|
'${BASH_REMATCH[3]}',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Regexp.BASH_REMATCH == expandmenu, insert, sc:b, map:xbr ==
|
||||||
|
|PickList( 'BASH_REMATCH', 'BashRematch' )|
|
||||||
|
|PICK|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
@ -0,0 +1,36 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Set
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: set == list ==
|
||||||
|
'allexport',
|
||||||
|
'braceexpand',
|
||||||
|
'emacs',
|
||||||
|
'errexit',
|
||||||
|
'errtrace',
|
||||||
|
'functrace',
|
||||||
|
'hashall',
|
||||||
|
'histexpand',
|
||||||
|
'history',
|
||||||
|
'ignoreeof',
|
||||||
|
'keyword',
|
||||||
|
'monitor',
|
||||||
|
'noclobber',
|
||||||
|
'noexec',
|
||||||
|
'noglob',
|
||||||
|
'notify',
|
||||||
|
'nounset',
|
||||||
|
'onecmd',
|
||||||
|
'physical',
|
||||||
|
'pipefail',
|
||||||
|
'posix',
|
||||||
|
'privileged',
|
||||||
|
'verbose',
|
||||||
|
'vi',
|
||||||
|
'xtrace',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Set == expandmenu, map:bse, sc:s ==
|
||||||
|
|PickList( 'set option', 'set' )|
|
||||||
|
set -o |PICK|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
@ -0,0 +1,54 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Shell Options
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: shopt == list ==
|
||||||
|
'autocd',
|
||||||
|
'cdable_vars',
|
||||||
|
'cdspell',
|
||||||
|
'checkhash',
|
||||||
|
'checkjobs',
|
||||||
|
'checkwinsize',
|
||||||
|
'cmdhist',
|
||||||
|
'compat31',
|
||||||
|
'compat32',
|
||||||
|
'compat40',
|
||||||
|
'compat41',
|
||||||
|
'dirspell',
|
||||||
|
'direxpand',
|
||||||
|
'dotglob',
|
||||||
|
'execfail',
|
||||||
|
'expand_aliases',
|
||||||
|
'extdebug',
|
||||||
|
'extglob',
|
||||||
|
'extquote',
|
||||||
|
'failglob',
|
||||||
|
'force_fignore',
|
||||||
|
'globstar',
|
||||||
|
'gnu_errfmt',
|
||||||
|
'histappend',
|
||||||
|
'histreedit',
|
||||||
|
'histverify',
|
||||||
|
'hostcomplete',
|
||||||
|
'huponexit',
|
||||||
|
'interactive_comments',
|
||||||
|
'lastpipe',
|
||||||
|
'lithist',
|
||||||
|
'login_shell',
|
||||||
|
'mailwarn',
|
||||||
|
'no_empty_cmd_completion',
|
||||||
|
'nocaseglob',
|
||||||
|
'nocasematch',
|
||||||
|
'nullglob',
|
||||||
|
'progcomp',
|
||||||
|
'promptvars',
|
||||||
|
'restricted_shell',
|
||||||
|
'shift_verbose',
|
||||||
|
'sourcepath',
|
||||||
|
'xpg_echo',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Shopts == expandmenu, insert, map:bso, sc:o ==
|
||||||
|
|PickList( 'Shopts', 'shopt' )|
|
||||||
|
shopt -s |PICK|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
@ -0,0 +1,21 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Special Parameters
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: SpecialParameters == hash ==
|
||||||
|
'number of posit. param., ${#}' : '${#}',
|
||||||
|
'all posit. param. (quoted spaces), ${*}' : '${*}',
|
||||||
|
'all posit. param. (unquoted spaces), ${@}' : '${@}',
|
||||||
|
'number of posit. parameters, ${#@}' : '${#@}',
|
||||||
|
'return code of last command, ${?}' : '${?}',
|
||||||
|
'PID of this shell, ${$}' : '${$}',
|
||||||
|
'flags set, ${-}' : '${-}',
|
||||||
|
'last argument of prev. command, ${_}' : '${_}',
|
||||||
|
'PID of last background command, ${!}' : '${!}',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== SpecParams == expandmenu, insert, sc:p, map:bsp ==
|
||||||
|
|PickList( 'Special Parameters', 'SpecialParameters' )|
|
||||||
|
|PICK|<CURSOR>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Statements
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== Statements.case == map:sc, shortcut:c ==
|
||||||
|
case <CURSOR> in
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac # --- end of case ---
|
||||||
|
== Statements.elif == map:sei, shortcut:e ==
|
||||||
|
elif <CURSOR> ; then
|
||||||
|
== Statements.for-in == map:sf, shortcut:f ==
|
||||||
|
for <CURSOR> in ; do
|
||||||
|
<SPLIT><-LOOP_BODY->
|
||||||
|
done
|
||||||
|
== Statements.for == map:sfo, shortcut:f ==
|
||||||
|
for (( CNTR=0; CNTR<<CURSOR>0; CNTR+=1 )); do
|
||||||
|
<SPLIT><-LOOP_BODY->
|
||||||
|
done
|
||||||
|
== Statements.if == map:si, shortcut:i ==
|
||||||
|
if <CURSOR> ; then
|
||||||
|
<SPLIT><-IF_PART->
|
||||||
|
fi
|
||||||
|
== Statements.if-else == map:sie, shortcut:i ==
|
||||||
|
if <CURSOR> ; then
|
||||||
|
<SPLIT><-IF_PART->
|
||||||
|
else
|
||||||
|
<+ELSE_PART+>
|
||||||
|
fi
|
||||||
|
== Statements.select == map:ss, shortcut:s ==
|
||||||
|
select <CURSOR> in ; do
|
||||||
|
<SPLIT>done
|
||||||
|
== Statements.until == map:su, shortcut:u ==
|
||||||
|
until <CURSOR> ; do
|
||||||
|
<SPLIT>done
|
||||||
|
== Statements.while == map:sw, shortcut:w ==
|
||||||
|
while <CURSOR> ; do
|
||||||
|
<SPLIT>done
|
||||||
|
== Statements.function == map:sfu, shortcut:f ==
|
||||||
|
function |?FUNCTION_NAME| ()
|
||||||
|
{
|
||||||
|
<CURSOR><SPLIT>
|
||||||
|
} # ---------- end of function |FUNCTION_NAME| ----------
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
§ -------------------------------------------------------------
|
||||||
|
|
||||||
|
== SEP: Statements.sep-print ==
|
||||||
|
|
||||||
|
== Statements.echo == insert, map:se, shortcut:e ==
|
||||||
|
echo -e "<CURSOR><SPLIT>"
|
||||||
|
== Statements.printf == insert, map:sp, shortcut:p ==
|
||||||
|
printf "%s\n" <CURSOR><SPLIT>
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
§ -------------------------------------------------------------
|
||||||
|
|
||||||
|
== SEP: Statements.sep-array ==
|
||||||
|
|
||||||
|
== Statements.array element == insert, map:sae, shortcut:a ==
|
||||||
|
${<CURSOR><SPLIT>[]}
|
||||||
|
== Statements.array elements, all == insert, map:saa, shortcut:a ==
|
||||||
|
${<CURSOR><SPLIT>[@]}
|
||||||
|
== Statements.array elements, string == insert, map:sas, shortcut:s ==
|
||||||
|
${<CURSOR><SPLIT>[*]}
|
||||||
|
== Statements.subarray == insert, map:ssa, shortcut:s ==
|
||||||
|
${<CURSOR><SPLIT>[@]::}
|
||||||
|
== Statements.no of element == insert, map:san, shortcut:n ==
|
||||||
|
${#<CURSOR><SPLIT>[@]}
|
||||||
|
== Statements.array indices== insert, map:sai, shortcut:i ==
|
||||||
|
${!<CURSOR><SPLIT>[@]}
|
||||||
|
== ENDTEMPLATE ==
|
@ -0,0 +1,86 @@
|
|||||||
|
§ =============================================================
|
||||||
|
§ Tests
|
||||||
|
§ =============================================================
|
||||||
|
|
||||||
|
== LIST: TestsArithmetic == hash ==
|
||||||
|
'arg1 is equal to arg2, -eq' : '-eq',
|
||||||
|
'arg1 not equal to arg2, -ne' : '-ne',
|
||||||
|
'arg1 less than arg2, -lt' : '-lt',
|
||||||
|
'arg1 less than or equal to arg2, -le' : '-le',
|
||||||
|
'arg1 greater than arg2, -gt' : '-gt',
|
||||||
|
'arg1 greater than or equal to arg2, -ge' : '-ge',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Tests.arithmetic tests == expandmenu, insert, sc:a, map:ta ==
|
||||||
|
|PickList( 'arithmetic tests', 'TestsArithmetic' )|
|
||||||
|
[ <CURSOR> |PICK| ]
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== LIST: TestsFilePermission == hash ==
|
||||||
|
'readable, -r' : '-r',
|
||||||
|
'writable, -w' : '-w',
|
||||||
|
'executable, -x' : '-x',
|
||||||
|
'SUID-bit is set, -u' : '-u',
|
||||||
|
'SGID-bit is set, -g' : '-g',
|
||||||
|
'sticky bit is set, -k' : '-k',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Tests.file permissions == expandmenu, insert, sc:p, map:tfp ==
|
||||||
|
|PickList( 'file permission', 'TestsFilePermission' )|
|
||||||
|
[ <CURSOR> |PICK| ]
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== LIST: TestsFileTypes == hash ==
|
||||||
|
'block special file, -b' : '-b',
|
||||||
|
'character special file, -c' : '-c',
|
||||||
|
'directory, -d' : '-d',
|
||||||
|
'named pipe (FIFO), -p' : '-p',
|
||||||
|
'regular file, -f' : '-f',
|
||||||
|
'socket, -S' : '-S',
|
||||||
|
'symboloc link, -L, -h' : '-L',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Tests.file types == expandmenu, insert, sc:t, map:tft ==
|
||||||
|
|PickList( 'file type', 'TestsFileTypes' )|
|
||||||
|
[ <CURSOR> |PICK| ]
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== LIST: TestsFileCharacteristics == hash ==
|
||||||
|
'file exists, -e, -a' : '-e',
|
||||||
|
'file exists, size greater zero, -s' : '-s',
|
||||||
|
'file exists, owned by eff UID, -O' : '-O',
|
||||||
|
'file exists, owned by eff GID, -G' : '-G',
|
||||||
|
'file exists, modified since last read, -N' : '-N',
|
||||||
|
'file1 newer than file2, -nt' : '-nt',
|
||||||
|
'file1 older than file2, -ot' : '-ot',
|
||||||
|
'files have same device and inode numbers , -ef' : '-ef',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Tests.file characteristics == expandmenu, insert, sc:c, map:tfc ==
|
||||||
|
|PickList( 'file characteristics', 'TestsFileCharacteristics' )|
|
||||||
|
[ <CURSOR> |PICK| ]
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== LIST: TestsStrings == hash ==
|
||||||
|
'length is zero, -z' : '-z',
|
||||||
|
'length is non-zero, -n' : '-n',
|
||||||
|
'strings are equal, ==' : '==',
|
||||||
|
'strings are not equal, !=' : '!=',
|
||||||
|
'sorts before, <' : '<',
|
||||||
|
'sorts after, >' : '>',
|
||||||
|
== ENDLIST ==
|
||||||
|
|
||||||
|
== Tests.string comparison == expandmenu, insert, sc:s, map:ts ==
|
||||||
|
|PickList( 'string comparisons', 'TestsStrings' )|
|
||||||
|
[ <CURSOR> |PICK| ]
|
||||||
|
== ENDTEMPLATE ==
|
||||||
|
|
||||||
|
== Tests.option is enabled, -o == insert, map:toe, sc:o ==
|
||||||
|
[ -o <CURSOR> ]
|
||||||
|
== Tests.variable has been set, -v == insert, map:tvs, sc:v ==
|
||||||
|
[ -v <CURSOR> ]
|
||||||
|
== Tests.file descriptor is open, refers to a terminal, -t == insert, map:tfd, sc:d ==
|
||||||
|
[ -t <CURSOR> ]
|
||||||
|
== Tests.string matches regexp == insert, map:tm, sc:m ==
|
||||||
|
[[ <CURSOR> =~ ]]
|
||||||
|
== ENDTEMPLATE ==
|
@ -0,0 +1,264 @@
|
|||||||
|
BASH
|
||||||
|
BASHPID
|
||||||
|
BASH_ALIASES
|
||||||
|
BASH_ARGC
|
||||||
|
BASH_ARGV
|
||||||
|
BASH_CMDS
|
||||||
|
BASH_COMMAND
|
||||||
|
BASH_ENV
|
||||||
|
BASH_EXECUTION_STRING
|
||||||
|
BASH_LINENO
|
||||||
|
BASHOPTS
|
||||||
|
BASH_REMATCH
|
||||||
|
BASH_SOURCE
|
||||||
|
BASH_SUBSHELL
|
||||||
|
BASH_VERSINFO
|
||||||
|
BASH_VERSION
|
||||||
|
BASH_XTRACEFD
|
||||||
|
CDPATH
|
||||||
|
COLUMNS
|
||||||
|
COMPREPLY
|
||||||
|
COMP_CWORD
|
||||||
|
COMP_KEY
|
||||||
|
COMP_LINE
|
||||||
|
COMP_POINT
|
||||||
|
COMP_TYPE
|
||||||
|
COMP_WORDBREAKS
|
||||||
|
COMP_WORDS
|
||||||
|
DIRSTACK
|
||||||
|
EMACS
|
||||||
|
EUID
|
||||||
|
FCEDIT
|
||||||
|
FIGNORE
|
||||||
|
FUNCNAME
|
||||||
|
FUNCNEST
|
||||||
|
GLOBIGNORE
|
||||||
|
GROUPS
|
||||||
|
HISTCMD
|
||||||
|
HISTCONTROL
|
||||||
|
HISTFILE
|
||||||
|
HISTFILESIZE
|
||||||
|
HISTIGNORE
|
||||||
|
HISTSIZE
|
||||||
|
HISTTIMEFORMAT
|
||||||
|
HOME
|
||||||
|
HOSTFILE
|
||||||
|
HOSTNAME
|
||||||
|
HOSTTYPE
|
||||||
|
IFS
|
||||||
|
IGNOREEOF
|
||||||
|
INPUTRC
|
||||||
|
LANG
|
||||||
|
LC_ALL
|
||||||
|
LC_COLLATE
|
||||||
|
LC_CTYPE
|
||||||
|
LC_MESSAGES
|
||||||
|
LC_NUMERIC
|
||||||
|
LINENO
|
||||||
|
LINES
|
||||||
|
MACHTYPE
|
||||||
|
MAIL
|
||||||
|
MAILCHECK
|
||||||
|
MAILPATH
|
||||||
|
OLDPWD
|
||||||
|
OPTARG
|
||||||
|
OPTERR
|
||||||
|
OPTIND
|
||||||
|
OSTYPE
|
||||||
|
PATH
|
||||||
|
PIPESTATUS
|
||||||
|
POSIXLY_CORRECT
|
||||||
|
PPID
|
||||||
|
PROMPT_COMMAND
|
||||||
|
PROMPT_DIRTRIM
|
||||||
|
PS1
|
||||||
|
PS2
|
||||||
|
PS3
|
||||||
|
PS4
|
||||||
|
PWD
|
||||||
|
RANDOM
|
||||||
|
REPLY
|
||||||
|
SECONDS
|
||||||
|
SHELL
|
||||||
|
SHELLOPTS
|
||||||
|
SHLVL
|
||||||
|
TIMEFORMAT
|
||||||
|
TMOUT
|
||||||
|
TMPDIR
|
||||||
|
UID
|
||||||
|
auto_resume
|
||||||
|
histchars
|
||||||
|
|
||||||
|
alias
|
||||||
|
bg
|
||||||
|
bind
|
||||||
|
break
|
||||||
|
builtin
|
||||||
|
caller
|
||||||
|
cd
|
||||||
|
command
|
||||||
|
compgen
|
||||||
|
complete
|
||||||
|
compopt
|
||||||
|
continue
|
||||||
|
declare
|
||||||
|
dirs
|
||||||
|
disown
|
||||||
|
echo
|
||||||
|
enable
|
||||||
|
eval
|
||||||
|
exec
|
||||||
|
exit
|
||||||
|
export
|
||||||
|
false
|
||||||
|
fc
|
||||||
|
fg
|
||||||
|
getopts
|
||||||
|
hash
|
||||||
|
help
|
||||||
|
history
|
||||||
|
jobs
|
||||||
|
kill
|
||||||
|
let
|
||||||
|
local
|
||||||
|
logout
|
||||||
|
mapfile
|
||||||
|
popd
|
||||||
|
printf
|
||||||
|
pushd
|
||||||
|
pwd
|
||||||
|
read
|
||||||
|
readarray
|
||||||
|
readonly
|
||||||
|
return
|
||||||
|
set
|
||||||
|
shift
|
||||||
|
shopt
|
||||||
|
source
|
||||||
|
suspend
|
||||||
|
test
|
||||||
|
times
|
||||||
|
trap
|
||||||
|
true
|
||||||
|
type
|
||||||
|
typeset
|
||||||
|
ulimit
|
||||||
|
umask
|
||||||
|
unalias
|
||||||
|
unset
|
||||||
|
wait
|
||||||
|
|
||||||
|
case
|
||||||
|
done
|
||||||
|
elif
|
||||||
|
else
|
||||||
|
esac
|
||||||
|
for
|
||||||
|
function
|
||||||
|
select
|
||||||
|
then
|
||||||
|
time
|
||||||
|
until
|
||||||
|
while
|
||||||
|
|
||||||
|
allexport
|
||||||
|
braceexpand
|
||||||
|
emacs
|
||||||
|
errexit
|
||||||
|
errtrace
|
||||||
|
functrace
|
||||||
|
hashall
|
||||||
|
histexpand
|
||||||
|
history
|
||||||
|
ignoreeof
|
||||||
|
keyword
|
||||||
|
monitor
|
||||||
|
noclobber
|
||||||
|
noexec
|
||||||
|
noglob
|
||||||
|
notify
|
||||||
|
nounset
|
||||||
|
onecmd
|
||||||
|
physical
|
||||||
|
pipefail
|
||||||
|
posix
|
||||||
|
privileged
|
||||||
|
verbose
|
||||||
|
xtrace
|
||||||
|
|
||||||
|
autocd
|
||||||
|
cdable_vars
|
||||||
|
cdspell
|
||||||
|
checkhash
|
||||||
|
checkjobs
|
||||||
|
checkwinsize
|
||||||
|
cmdhist
|
||||||
|
compat31
|
||||||
|
compat32
|
||||||
|
compat40
|
||||||
|
compat41
|
||||||
|
dirspell
|
||||||
|
dotglob
|
||||||
|
execfail
|
||||||
|
expand_aliases
|
||||||
|
extdebug
|
||||||
|
extglob
|
||||||
|
extquote
|
||||||
|
failglob
|
||||||
|
force_fignore
|
||||||
|
globstar
|
||||||
|
gnu_errfmt
|
||||||
|
histappend
|
||||||
|
histreedit
|
||||||
|
histverify
|
||||||
|
hostcomplete
|
||||||
|
huponexit
|
||||||
|
interactive_comments
|
||||||
|
lastpipe
|
||||||
|
lithist
|
||||||
|
login_shell
|
||||||
|
mailwarn
|
||||||
|
no_empty_cmd_completion
|
||||||
|
nocaseglob
|
||||||
|
nocasematch
|
||||||
|
nullglob
|
||||||
|
progcomp
|
||||||
|
promptvars
|
||||||
|
restricted_shell
|
||||||
|
shift_verbose
|
||||||
|
sourcepath
|
||||||
|
xpg_echo
|
||||||
|
|
||||||
|
SIGABRT
|
||||||
|
SIGALRM
|
||||||
|
SIGBUS
|
||||||
|
SIGCHLD
|
||||||
|
SIGCONT
|
||||||
|
SIGFPE
|
||||||
|
SIGHUP
|
||||||
|
SIGILL
|
||||||
|
SIGINT
|
||||||
|
SIGIO
|
||||||
|
SIGKILL
|
||||||
|
SIGPIPE
|
||||||
|
SIGPROF
|
||||||
|
SIGPWR
|
||||||
|
SIGQUIT
|
||||||
|
SIGRTMAX
|
||||||
|
SIGRTMIN
|
||||||
|
SIGSEGV
|
||||||
|
SIGSTKFLT
|
||||||
|
SIGSTOP
|
||||||
|
SIGSYS
|
||||||
|
SIGTERM
|
||||||
|
SIGTRAP
|
||||||
|
SIGTSTP
|
||||||
|
SIGTTIN
|
||||||
|
SIGTTOU
|
||||||
|
SIGURG
|
||||||
|
SIGUSR1
|
||||||
|
SIGUSR2
|
||||||
|
SIGVTALRM
|
||||||
|
SIGWINCH
|
||||||
|
SIGXCPU
|
||||||
|
SIGXFSZ
|
437
.config/nvim/plugged/bash-support.vim/doc/ChangeLog
Normal file
437
.config/nvim/plugged/bash-support.vim/doc/ChangeLog
Normal file
@ -0,0 +1,437 @@
|
|||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 4.2
|
||||||
|
=======================================================================================
|
||||||
|
|
||||||
|
- Default shell can be set in ~/.vimrc via g:BASH_Executable.
|
||||||
|
- Errors can be parsed for bash, dash, ksh, zsh.
|
||||||
|
- Bugfix: QuickFix list doesn't work properly (thanks to @PengZheng)
|
||||||
|
- 'Run -> make script executable' (\re) is now a toggle.
|
||||||
|
- Minor corrections and improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 4.1
|
||||||
|
=======================================================================================
|
||||||
|
|
||||||
|
- Filetype plugin added.
|
||||||
|
- Bugfix: Setup of local templates in case of global installation.
|
||||||
|
- Adjusting end-of-line comments improved.
|
||||||
|
- Submenu 'Regexp' renamed to 'PatternMatching'. Appropriate hotkeys renamed.
|
||||||
|
- Minor bugfixes.
|
||||||
|
- Documentation updated.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 4.0
|
||||||
|
=======================================================================================
|
||||||
|
|
||||||
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
++ The plug-in version 4.0+ is a rewriting of version 3.12.1. ++
|
||||||
|
++ The versions 4.0+ are based on a new and more powerful template system ++
|
||||||
|
++ (please see ":help template-support" for more information). ++
|
||||||
|
++ The template syntax has changed! ++
|
||||||
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
|
- New template system (many thanks to Wolfgang Mehner)
|
||||||
|
- A few new hotkeys and menu item.
|
||||||
|
- A few hotkeys and menu items renamed.
|
||||||
|
- Footer did not appear in doc/bash-hotkeys.pdf
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.12.1
|
||||||
|
=======================================================================================
|
||||||
|
- Minor additions and bugfixes in 2 menus.
|
||||||
|
- Test -v added.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.12
|
||||||
|
=======================================================================================
|
||||||
|
- New global variable g:BASH_InsertFileHeader (suppress file description comment for new files)
|
||||||
|
- New menu item 'view code snippet' (\nv).
|
||||||
|
- New ex command BASH_ScriptCmdLineArguments.
|
||||||
|
- 3 ex commands renamed.
|
||||||
|
- Minor internal improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.11
|
||||||
|
=======================================================================================
|
||||||
|
- Rendering of manuals (\hm) and Bash help (\hh).
|
||||||
|
- Bugfix: \hb, \hm, \hh not working.
|
||||||
|
- Minor internal improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.10
|
||||||
|
=======================================================================================
|
||||||
|
- Resolve $HOME for linked home directories.
|
||||||
|
- Wrong insertion for parameter substitution "match beginning; del longest
|
||||||
|
part" (thanks to John Orr).
|
||||||
|
- Other minor bugs fixed.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.9
|
||||||
|
=======================================================================================
|
||||||
|
- Hotkey renamed: \st -> \su
|
||||||
|
- New global variable allows loading menus only with filetype 'sh'.
|
||||||
|
- Comments: echo "<line>" escapes double quotes in original text.
|
||||||
|
- Other minor bugs fixed.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.8
|
||||||
|
=======================================================================================
|
||||||
|
- New comment submenu 'script sections'.
|
||||||
|
- Two new hotkeys \css, \ckc for commenting.
|
||||||
|
- Two new plugin tags: LICENSE,ORGANIZATION
|
||||||
|
- Run menu: new item 'Bash cmd. line arg.' (\rba).
|
||||||
|
- I/O-Redir-menu: additional item'>&2'
|
||||||
|
- System-wide installation: minimal Template file for a user will automatically
|
||||||
|
be added.
|
||||||
|
- Hotkey renamed: \t -> \t1
|
||||||
|
- A few code snippets for debugging added.
|
||||||
|
- Bugfix: \cl did not work in insert mode.
|
||||||
|
- Other minor bugs fixed.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.7
|
||||||
|
=======================================================================================
|
||||||
|
- The three hotkeys \cl, \cj, \cc allow a range, e.g. '3\cl' (see help text and
|
||||||
|
bash-hot-key.pdf).
|
||||||
|
- Plugin loads faster: loading the templates is delayed until the first use.
|
||||||
|
- Plugin now works with pathogen.vim.
|
||||||
|
- Menus will always be generated (for the use with :emenu).
|
||||||
|
- Bugfix: no local templates available with a system-wide installation (thanks to Iain Arnell).
|
||||||
|
- Several improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.6
|
||||||
|
=======================================================================================
|
||||||
|
- New hotkey \ssa and menu entry for the selection of a subarray.
|
||||||
|
- Bugfix: detection of a systemwide installation can fail.
|
||||||
|
- Minor improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.5
|
||||||
|
=======================================================================================
|
||||||
|
- Bugfix: detection of a systemwide installation can fail.
|
||||||
|
- Minor improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.4
|
||||||
|
=======================================================================================
|
||||||
|
- 2 new hotkeys: \t, \t2 (empty tests)
|
||||||
|
- Windows: user and system installation.
|
||||||
|
- Syntax check under Windows.
|
||||||
|
- Several minor bugsfixed.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.3
|
||||||
|
=======================================================================================
|
||||||
|
- 3 hotkeys renamed: \sl -> \sei (elif), \sas -> \saa ( ${.[@]} ) , \hp -> \hbs.
|
||||||
|
- 3 new hotkeys: \sa1 ( ${.[*]} ), \san ( ${#.[@]} ), \sai ( ${!.[@]} ).
|
||||||
|
- 1 new menu entry (Tests)
|
||||||
|
- Minor improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.2
|
||||||
|
=======================================================================================
|
||||||
|
- New hotkey and menu entry for [[ =~ ]]
|
||||||
|
- New for Bash 4.1: shopt 'compat40', variables '$BASHOPTS', '$BASH_XTRACEFD'.
|
||||||
|
- Bugfixes: local installation looks like a system-wide installation in seldom cases.
|
||||||
|
- Bugfixes: typo in 4 menu entries.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.1.1
|
||||||
|
=======================================================================================
|
||||||
|
- Bugfixes: code snippets will not be found if plugin not installed beyond '$HOME/.vim'.
|
||||||
|
- Bugfixes: undocumented global variable used in above non-standard installation.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.1
|
||||||
|
=======================================================================================
|
||||||
|
- The plugin now handles different template styles without editing and
|
||||||
|
reloading the main template file.
|
||||||
|
- New hotkey and ex-command to switch template styles.
|
||||||
|
- New global List/Dictionnary g:BASH_AlsoBash: add filename pattern (and
|
||||||
|
styles) for files not named *.sh .
|
||||||
|
- Minor improvements.
|
||||||
|
- Bugfixes: missing redraws in some cases.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.0.1
|
||||||
|
=======================================================================================
|
||||||
|
- New global variable g:BASH_Errorformat: adapt the error format used to parse
|
||||||
|
runtime messages to your locale setting.
|
||||||
|
- Bugfix (Windows only): missing internal variable prevents proper initialization.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 3.0
|
||||||
|
=======================================================================================
|
||||||
|
+ Completely new template system. User can change templates on the fly.
|
||||||
|
+ Additional mapping Ctrl-j : jump behind parenthesis or strings in the current line.
|
||||||
|
+ A few Posix character classes have better shortcuts.
|
||||||
|
+ Bugfix: insert mode for Posix character classes.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.14
|
||||||
|
=======================================================================================
|
||||||
|
+ Debugging: ddd always called with bashdb(1).
|
||||||
|
+ More complete adaption to Bash 4.0: options, builtins, environment variables.
|
||||||
|
+ Bugfix: running and starting the debugger causes error if working directory is not
|
||||||
|
the directory of the current file.
|
||||||
|
+ Minor improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.13
|
||||||
|
=======================================================================================
|
||||||
|
+ New menu item 'array element'.
|
||||||
|
+ New hotkeys \sa, \sas.
|
||||||
|
+ New submenu 'Snippets'.
|
||||||
|
+ Hotkeys for the POSIX character classes.
|
||||||
|
+ Hardcopy (run menu) can print any buffer.
|
||||||
|
+ Bugfix: 'Run->save + run script' (\rr, <C-F9>) : visual mode broken.
|
||||||
|
+ Minor improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.12
|
||||||
|
=======================================================================================
|
||||||
|
+ Hotkeys are shown in the menus.
|
||||||
|
+ New menu item and hotkey \hb : open the Bash manual.
|
||||||
|
+ New hotkey \rco : syntax check options.
|
||||||
|
+ File browser for code snippets choosable (new global variable).
|
||||||
|
+ Bugfix: wrapper script for use of a xterm could not handle parameters containing blanks.
|
||||||
|
+ Minor improvements.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.11
|
||||||
|
=======================================================================================
|
||||||
|
+ Additions for Bash version 4.0.
|
||||||
|
+ Comments menu (\cj): adjustment of end-of-line comments improved.
|
||||||
|
+ Two submenus rearranged.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.10
|
||||||
|
=======================================================================================
|
||||||
|
- new item in the Statements-menu: 'for ((...)) do done'.
|
||||||
|
- new item in the Statements-menu: 'printf "%s"'.
|
||||||
|
- new item in the Statements-menu: indirect parameter expansion ${!name}
|
||||||
|
- Bugfix: unnecessary submenu beyond 'Environ'.
|
||||||
|
- Bugfix: shopt menu had no insert mode.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.9.1
|
||||||
|
=======================================================================================
|
||||||
|
- Map leader for hotkeys now user definable: new global variable g:BASH_MapLeader.
|
||||||
|
- Bugfix: 'Statements->no. of elem.s' inserts wrong text.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.9
|
||||||
|
=======================================================================================
|
||||||
|
+ Can now be used under Windows, e.g. with win-bash (few restrictions).
|
||||||
|
+ Name completion when entering a builtin name.
|
||||||
|
+ Bugfix: help shows no selection when just 2 manuals are available.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.8
|
||||||
|
=======================================================================================
|
||||||
|
+ New help menu: help reorganized, 3 new help hotkeys.
|
||||||
|
+ The help hotkeys now also work when Vim is run on the console.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.7.1
|
||||||
|
=======================================================================================
|
||||||
|
+ Minor bugfix in the I/O-Redir-menu.
|
||||||
|
+ I/O-Redir-menu shows redirectors (sort of help).
|
||||||
|
+ I/O-Redir-menu: here-document item has a vmode.
|
||||||
|
+ File name expansion for the first command line argument entered with <S-F9>.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.7
|
||||||
|
=======================================================================================
|
||||||
|
+ When a Bash script is started from the Vim command line errors and warnings (if any)
|
||||||
|
are caught in an error window allowing quickfix commands to be used.
|
||||||
|
+ Scripts which are not set executable can be run under Vim.
|
||||||
|
+ One new hotkey.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.6
|
||||||
|
=======================================================================================
|
||||||
|
+ Superfluous control characters for mode switching (menus, hotkeys) removed. Caused beeps.
|
||||||
|
+ Most hotkeys now work in insert mode.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.5
|
||||||
|
=======================================================================================
|
||||||
|
+ Menu item 'toggle comment' replaces 'code->comment' and 'comment->code'
|
||||||
|
+ Hotkey \co removed, \cc is now a toggle.
|
||||||
|
+ Bugfix. Adjusting comments (\cj): # in '$#' and '${#...}' is no longer
|
||||||
|
regarded as a start of a comment.
|
||||||
|
+ Bugfix. \cl in insert mode called function for visual mode.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.4
|
||||||
|
=======================================================================================
|
||||||
|
+ Format for the macros |DATE|, |TIME|, and |YEAR| can be defined by the user.
|
||||||
|
+ Help text improved.
|
||||||
|
+ Option 'nocasematch' added
|
||||||
|
+ Additional menu entries: 1 parameter substitution, 1 special variable, array index list.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.3
|
||||||
|
=======================================================================================
|
||||||
|
+ Changes to allow a system-wide installation.
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.2
|
||||||
|
=======================================================================================
|
||||||
|
+ Snippets can now be managed in the console mode.
|
||||||
|
+ Three new key mappings for snippet handling.
|
||||||
|
+ Three items from the statements menu removed (quoting; but see file customization.vimrc).
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.1
|
||||||
|
=======================================================================================
|
||||||
|
+ New menu item and key mapping to adjust end-of-line comments.
|
||||||
|
+ New insert mode mappings.
|
||||||
|
+ A few mappings have been renamed (to bring them into line with my C/C++ and Perl plugin).
|
||||||
|
|
||||||
|
=======================================================================================
|
||||||
|
RELEASE NOTES FOR VERSION 2.0.1
|
||||||
|
=======================================================================================
|
||||||
|
+ Bugfix: missing hotkey \ch added.
|
||||||
|
+ File wrapper.sh moved to the new directory 'bash-support/scripts'.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 2.0
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ PLUGIN DIRECTORIES REARRANGED.
|
||||||
|
+ One new mapping (\cs).
|
||||||
|
+ Statement menu extended.
|
||||||
|
+ Bash keyword help (S-F1) improved.
|
||||||
|
+ Bugfix: empty new file after removing the header template can't be closed.
|
||||||
|
+ Bugfix : Tools entry missing when root menu not shown from the start.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.15
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Needs Vim version 7.0+.
|
||||||
|
+ Inserting a function can be used in visual mode (+ new key mapping).
|
||||||
|
+ Bugfix: cursor misplaced after some visual mode operations.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.14
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Setting the column for the start of line-end comments improved.
|
||||||
|
+ Mac OS X : circumvent a Vim bug which caused a crash when loading plugin version 1.13.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.13
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ The hotkeys F9 and \rd now also starts the debugger if vim is running without GUI.
|
||||||
|
+ The debugger frontend ddd can be started as preferred debugger.
|
||||||
|
+ New help entry in the main menu of this plugin (shows the plugin documentation).
|
||||||
|
+ A hardcopy shows the localized date and time in the header line.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.12
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Bugfix: hotkey <S-F9> now working again.
|
||||||
|
+ Syntax check recognizes shopt options.
|
||||||
|
+ New regex menu: compose regular expressions with a few keystrokes from the menu.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.11
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Start debugger bashdb with a keystroke.
|
||||||
|
+ Parameter substitutions completed.
|
||||||
|
+ Environment variables completed / menu rearranged.
|
||||||
|
+ Builtins completed.
|
||||||
|
+ Code <-> comment working in all modes.
|
||||||
|
+ Insert/remove echo for commenting/uncommenting statements.
|
||||||
|
+ Script will be made executable before running it (e.g. after a "Save As...").
|
||||||
|
+ Statement menu now in alphabetical order.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.10.1
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Starting an xterm was not possible with some installations (bugfix).
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.10
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ New Bash 3.0 set options added.
|
||||||
|
+ Shopt-menu added.
|
||||||
|
+ More builtins.
|
||||||
|
+ <S-F1> or \h displays help for the Bash builtin command under the cursor.
|
||||||
|
+ Key mappings for all run menu entries.
|
||||||
|
+ Line end comments start in a fixed column now (can be set from the menu).
|
||||||
|
+ Spaces in path names and file names are now possible.
|
||||||
|
+ Template files and snippet files are no longer kept in the list of alternate files.
|
||||||
|
+ Global variable is_bash is set to avoid a wrong highlighting for $(..) and $((..)).
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.9
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Running a Bash-script
|
||||||
|
(1) The script can be run from the command line as usual.
|
||||||
|
(2) The output can be directed into a window with name "Bash-Output".
|
||||||
|
The buffer and its content will disappear when closing the window.
|
||||||
|
The buffer is reused when still open.
|
||||||
|
(3) The script can be run in an xterm.
|
||||||
|
+ The new hotkey Shift-F9 or the "cmd. line arg." sets command line arguments for the
|
||||||
|
current buffer (that is, each buffer can have its own arguments).
|
||||||
|
+ A code snippet with the file name extension "ni" or "noindent" will not be
|
||||||
|
indented on insertion.
|
||||||
|
+ 'Line End Comments' ignores blank lines in a marked block.
|
||||||
|
+ Calling a set-command (submenu "Set") for a marked block will set this option above
|
||||||
|
this block and unset it below.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.8
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Installation simplified.
|
||||||
|
+ Run syntax check / list errors in an error window
|
||||||
|
+ Append aligned comments to all lines of a marked block.
|
||||||
|
+ The root menu can be removed (default is not removed).
|
||||||
|
+ The dialog windows (GUI) have been replaced by more flexible command line inputs.
|
||||||
|
+ User will now be asked before a snippet file will be overwritten.
|
||||||
|
+ The undocumented and unnecessary hot key F12 has been removed.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.7
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Only one entry in the gVim root menu.
|
||||||
|
+ All hotkeys are only defined for bash files.
|
||||||
|
+ Install script added.
|
||||||
|
+ Customization improved.
|
||||||
|
+ Documentation improved.
|
||||||
|
+ Bug fix (template file handling)
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.6
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ 28 key mappings for Vim without GUI. See bash-hot-keys.pdf (reference card).
|
||||||
|
+ Vim doc added (file bashsupport.txt).
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.5
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Tag substitution rewritten (Some characters in a substitution text for a tag
|
||||||
|
prevented the tag from being substituted).
|
||||||
|
+ All bash variables can now be inserted from the menus.
|
||||||
|
+ A marked region can be surrounded by a for-, if, select- while- or until
|
||||||
|
statement (with indentation).
|
||||||
|
+ A marked text can be surrounded with quotes.
|
||||||
|
+ A marked region or a complete line can be surrounded with echo " ".
|
||||||
|
+ The echo " " can be removed from a line.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
RELEASE NOTES FOR VERSION 1.4
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
+ Block comments are now read as templates or skeletons from files:
|
||||||
|
frame Comment, function description, file header
|
||||||
|
+ These templates can contain tags like |FILENAME|, |AUTHOR| etc. which are replaced
|
||||||
|
after reading.
|
||||||
|
+ indentation: multiline inserts and code snippets will be indented after insertion.
|
||||||
|
+ Most menu entries are now also active in normal mode.
|
||||||
|
+ Reading the templates is done in one function which can be called in an autocmd.
|
||||||
|
+ Code cleanup: register z no longer used. Most function calls are silent now.
|
||||||
|
|
BIN
.config/nvim/plugged/bash-support.vim/doc/bash-hotkeys.pdf
Normal file
BIN
.config/nvim/plugged/bash-support.vim/doc/bash-hotkeys.pdf
Normal file
Binary file not shown.
268
.config/nvim/plugged/bash-support.vim/doc/bash-hotkeys.tex
Normal file
268
.config/nvim/plugged/bash-support.vim/doc/bash-hotkeys.tex
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
%%=====================================================================================
|
||||||
|
%%
|
||||||
|
%% File: bash-hotkeys.tex
|
||||||
|
%%
|
||||||
|
%% Description: bash-support.vim : Key mappings for Bash with/without GUI.
|
||||||
|
%%
|
||||||
|
%% Author: Dr.-Ing. Fritz Mehner
|
||||||
|
%% Email: mehner.fritz@fh-swf.de
|
||||||
|
%% Copyright: Copyright (C) 2013-2014 Dr.-Ing. Fritz Mehner (mehner.fritz@fh-swf.de)
|
||||||
|
%% Version: see \Pluginversion
|
||||||
|
%% Created: 20.05.2013
|
||||||
|
%%
|
||||||
|
%%=====================================================================================
|
||||||
|
|
||||||
|
%%======================================================================
|
||||||
|
%% LaTeX settings [[[1
|
||||||
|
%%======================================================================
|
||||||
|
|
||||||
|
\documentclass[oneside,11pt,landscape,DIV16]{scrartcl}
|
||||||
|
|
||||||
|
\usepackage[english]{babel}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\usepackage{times}
|
||||||
|
\usepackage{lastpage}
|
||||||
|
\usepackage{multicol}
|
||||||
|
\usepackage{fancyhdr}
|
||||||
|
|
||||||
|
\setlength\parindent{0pt}
|
||||||
|
|
||||||
|
\newcommand{\Pluginversion}{4.2.1}
|
||||||
|
\newcommand{\ReleaseDate}{\today}
|
||||||
|
\newcommand{\Rep}{{\scriptsize{[n]}}}
|
||||||
|
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% fancyhdr
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\pagestyle{fancyplain}
|
||||||
|
\fancyhf{}
|
||||||
|
\fancyfoot[L]{\small \ReleaseDate}
|
||||||
|
\fancyfoot[C]{\small bash-support.vim}
|
||||||
|
\fancyfoot[R]{\small \textbf{Page \thepage{} / \pageref{LastPage}}}
|
||||||
|
\renewcommand{\headrulewidth}{0.0pt}
|
||||||
|
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% luximono : Type1-font
|
||||||
|
%% Makes keyword stand out by using semibold letters.
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\usepackage[scaled]{luximono}
|
||||||
|
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% hyperref
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\usepackage[ps2pdf]{hyperref}
|
||||||
|
\hypersetup{pdfauthor={Dr.-Ing. Fritz Mehner, FH Südwestfalen, Iserlohn, Germany}}
|
||||||
|
\hypersetup{pdfkeywords={Vim, Perl}}
|
||||||
|
\hypersetup{pdfsubject={Vim-plug-in, bash-support.vim, hot keys}}
|
||||||
|
\hypersetup{pdftitle={Vim-plug-in, bash-support.vim, hot keys}}
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%% START OF DOCUMENT
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\begin{document}%
|
||||||
|
|
||||||
|
\begin{multicols}{3}
|
||||||
|
%
|
||||||
|
\begin{center}
|
||||||
|
%
|
||||||
|
%%======================================================================
|
||||||
|
%% title [[[1
|
||||||
|
%%======================================================================
|
||||||
|
\textbf{\textsc{\small{Vim-Plug-in}}}\\
|
||||||
|
\textbf{\LARGE{bash-support.vim}}\\
|
||||||
|
\textbf{\textsc{\small{Version \Pluginversion}}}\\
|
||||||
|
\vspace{5mm}%
|
||||||
|
\textbf{\textsc{\Huge{Hot keys}}}\\
|
||||||
|
\vspace{5mm}%
|
||||||
|
Key mappings for Vim and gVim.\\
|
||||||
|
Plug-in: http://vim.sourceforge.net\\
|
||||||
|
Fritz Mehner (mehner.fritz@fh-swf.de)\\
|
||||||
|
\vspace{1.0mm}
|
||||||
|
{\normalsize (i)} insert mode, {\normalsize (n)} normal mode, {\normalsize (v)} visual mode\\
|
||||||
|
\vspace{4.0mm}
|
||||||
|
|
||||||
|
%%======================================================================
|
||||||
|
%% table, left part [[[1
|
||||||
|
%%======================================================================
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% main menu [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%%~~~~~ TABULAR : begin ~~~~~~~~~~
|
||||||
|
\begin{tabular}[]{|p{11mm}|p{60mm}|}
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{B}ash}}\\[1.0ex]
|
||||||
|
\hline \verb'\bps' & \textbf{p}arameter \textbf{s}ubstitution (list) \hfill (n, i)\\
|
||||||
|
\hline \verb'\bsp' & \textbf{s}pecial \textbf{p}arameters (list) \hfill (n, i)\\
|
||||||
|
\hline \verb'\ben' & \textbf{en}vironment (list) \hfill (n, i)\\
|
||||||
|
\hline \verb'\bbu' & \textbf{bu}iltins (list) \hfill (n, i)\\
|
||||||
|
\hline \verb'\bse' & \textbf{se}t options (list) \hfill (n, i)\\
|
||||||
|
\hline \verb'\bso' & \textbf{s}h\textbf{o}pts (list) \hfill (n, i)\\
|
||||||
|
\hline
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu Comments [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{C}omments}} \\[1.0ex]
|
||||||
|
\hline \Rep\verb'\cl' & end-of-line comment \hfill (n, i, v)\\
|
||||||
|
\hline \Rep\verb'\cj' & adjust end-of-line comments \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\cs' & set end-of-line comment col. \hfill (n)\\
|
||||||
|
%
|
||||||
|
\hline \Rep\verb'\cc' & code $\rightarrow$ comment \hfill (n, i, v)\\
|
||||||
|
\hline \Rep\verb'\cu' & uncomment code \hfill (n, i, v)\\
|
||||||
|
%
|
||||||
|
\hline \verb'\cfr' & frame comment \hfill (n, i)\\
|
||||||
|
\hline \verb'\cfu' & function description \hfill (n, i)\\
|
||||||
|
\hline \verb'\ch' & file header \hfill (n, i)\\
|
||||||
|
\hline \verb'\cd' & date \hfill (n, i)\\
|
||||||
|
\hline \verb'\ct' & date \& time \hfill (n, i)\\
|
||||||
|
\hline \verb'\css' & script sections \hfill (n, i)\\
|
||||||
|
\hline \verb'\ckc' & keyword comments \hfill (n, i)\\
|
||||||
|
\hline \verb'\cma' & plug-in macros \hfill (n, i)\\
|
||||||
|
%
|
||||||
|
\hline \verb'\ce' & \texttt{echo} "\textsl{actual line}" \hfill (n, i)\\
|
||||||
|
\hline \verb'\cr' & remove \texttt{echo} from actual line \hfill (n, i)\\
|
||||||
|
\hline
|
||||||
|
\end{tabular}\\
|
||||||
|
%%~~~~~ TABULAR : end ~~~~~~~~~~
|
||||||
|
%
|
||||||
|
%%======================================================================
|
||||||
|
%% table, middle part [[[1
|
||||||
|
%%======================================================================
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu Statements [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%%~~~~~ TABULAR : begin ~~~~~~~~~~
|
||||||
|
\begin{tabular}[]{|p{11mm}|p{60mm}|}
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{S}tatements}} \\[1.0ex]
|
||||||
|
\hline \verb'\sc' & \verb'case in ... esac' \hfill (n, i)\\
|
||||||
|
\hline \verb'\sei' & \verb'elif then' \hfill (n, i)\\
|
||||||
|
\hline \verb'\sf' & \verb'for in do done' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\sfo' & \verb'for ((...)) do done' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\si' & \verb'if then fi' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\sie' & \verb'if then else fi' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\ss' & \verb'select in do done' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\su' & \verb'until do done' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\sw' & \verb'while do done' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\sfu' & \verb'function' \hfill (n, i, v)\\
|
||||||
|
%
|
||||||
|
\hline \verb'\se' & \verb'echo -e ""' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\sp' & \verb'printf "%s"' \hfill (n, i, v)\\
|
||||||
|
%
|
||||||
|
\hline \verb'\sae' & array element\ \ \ \verb'${.[.]}' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\saa' & arr. elem.s (all) \ \verb'${.[@]}' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\sas' & arr. elem.s (1 word) \ \verb'${.[*]}' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\ssa' & subarray \ \verb'${.[@]::}' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\san' & no. of arr. elem.s \ \verb'${.[@]}' \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\sai' & list of indices \ \verb'${.[*]}' \hfill (n, i, v)\\
|
||||||
|
\hline
|
||||||
|
%%
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu Tests [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{T}ests}} \\[1.0ex]
|
||||||
|
\hline \verb'\ta' & arithmetic tests \hfill (n, i)\\
|
||||||
|
\hline \verb'\tfp' & file permissions \hfill (n, i)\\
|
||||||
|
\hline \verb'\tft' & file types \hfill (n, i)\\
|
||||||
|
\hline \verb'\tfc' & file characteristics \hfill (n, i)\\
|
||||||
|
\hline \verb'\ts' & string comparisons \hfill (n, i)\\
|
||||||
|
\hline \verb'\toe' & option is enabled \hfill (n, i)\\
|
||||||
|
\hline \verb'\tvs' & variables has been set \hfill (n, i)\\
|
||||||
|
\hline \verb'\tfd' & file descr. refers to a terminal \hfill (n, i)\\
|
||||||
|
\hline \verb'\tm' & string matches regexp \hfill (n, i)\\
|
||||||
|
\hline
|
||||||
|
%%
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu IO-Redirection [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{I}O-Redirection}} \\[1.0ex]
|
||||||
|
\hline \verb'\ior' & IO-redirections (list) \hfill (n, i)\\
|
||||||
|
\hline \verb'\ioh' & here-document \hfill (n, i)\\
|
||||||
|
\hline
|
||||||
|
%
|
||||||
|
\end{tabular}\\
|
||||||
|
%%~~~~~ TABULAR : end ~~~~~~~~~~
|
||||||
|
%
|
||||||
|
%%======================================================================
|
||||||
|
%% table, right part [[[1
|
||||||
|
%%======================================================================
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu Pattern Matching [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%%~~~~~ TABULAR : begin ~~~~~~~~~~
|
||||||
|
\begin{tabular}[]{|p{11mm}|p{62mm}|}
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{P}attern Matching}} \\[1.0ex]
|
||||||
|
\hline \verb'pzo' & zero or one, \verb' ?( | )' \hfill (n, i)\\
|
||||||
|
\hline \verb'pzm' & zero or more, \verb' *( | )' \hfill (n, i)\\
|
||||||
|
\hline \verb'pom' & one or more, \verb' +( | )' \hfill (n, i)\\
|
||||||
|
\hline \verb'peo' & exactly one, \verb' @( | )' \hfill (n, i)\\
|
||||||
|
\hline \verb'pae' & anything except, \verb' !( | )' \hfill (n, i)\\
|
||||||
|
\hline \verb'ppc' & POSIX classes \hfill (n, i)\\
|
||||||
|
\hline \verb'pbr' & \verb'${BASH_REMATCH[0'$\ldots$\verb'3]}' \hfill (n, i)\\
|
||||||
|
\hline
|
||||||
|
%
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu Snippet [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{S\textbf{n}ippets}} \\[1.0ex]
|
||||||
|
\hline \verb'\nr' & read code snippet \hfill (n, i)\\
|
||||||
|
\hline \verb'\nv' & view code snippet \hfill (n, i)\\
|
||||||
|
\hline \verb'\nw' & write code snippet \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\ne' & edit code snippet \hfill (n, i)\\
|
||||||
|
\hline \verb'\ntl' & edit templates \hfill (n, i)\\
|
||||||
|
\hline \verb'\ntr' & reread templates \hfill (n, i)\\
|
||||||
|
\hline \verb'\nts' & choose style \hfill (n, i)\\
|
||||||
|
\hline
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu Run [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{R}un}} \\[1.0ex]
|
||||||
|
\hline \verb'\rr' & update file, run script \hfill (n, i, v$^1$)\\
|
||||||
|
\hline \verb'\ra' & set script cmd. line arguments \hfill (n, i)\\
|
||||||
|
\hline \verb'\rba' & set Bash cmd. line arguments \hfill (n, i)\\
|
||||||
|
\hline \verb'\rc' & update file, check syntax \hfill (n, i)\\
|
||||||
|
\hline \verb'\rco' & syntax check options \hfill (n, i)\\
|
||||||
|
\hline \verb'\rd' & start debugger$^1$ \hfill (n, i)\\
|
||||||
|
\hline \verb'\re' & make script executable/not exec.$^1$ \hfill (n, i)\\
|
||||||
|
\hline \verb'\rh' & hardcopy buffer \hfill (n, i, v)\\
|
||||||
|
\hline \verb'\rs' & plug-in settings \hfill (n, i)\\
|
||||||
|
\hline \verb'\rx' & set xterm size$^{1,2}$ \hfill (n, i)\\
|
||||||
|
\hline \verb'\ro' & change output destination \hfill (n, i)\\
|
||||||
|
\hline
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
%% menu Help [[[2
|
||||||
|
%%----------------------------------------------------------------------
|
||||||
|
\hline
|
||||||
|
\multicolumn{2}{|r|}{\textsl{\textbf{H}elp}}\\[1.0ex]
|
||||||
|
\hline \verb'\hb' & display the Bash manual \hfill (n,i)\\
|
||||||
|
\hline \verb'\hh' & help (Bash builtins) \hfill (n,i)\\
|
||||||
|
\hline \verb'\hm' & show manual (cmd. line utilities) \hfill (n,i)\\
|
||||||
|
\hline \verb'\hp' & help (plug-in) \hfill (n,i)\\
|
||||||
|
\hline
|
||||||
|
\end{tabular}\\
|
||||||
|
%%~~~~~ TABULAR : end ~~~~~~~~~~
|
||||||
|
%
|
||||||
|
\vfill
|
||||||
|
%
|
||||||
|
\begin{minipage}[b]{75mm}%
|
||||||
|
\scriptsize{%
|
||||||
|
\vspace{2mm}
|
||||||
|
%\hrulefill\\
|
||||||
|
$^1$ {Linux/U**x only}\\
|
||||||
|
$^2$ {GUI only}
|
||||||
|
}%
|
||||||
|
\end{minipage}\\
|
||||||
|
%
|
||||||
|
%
|
||||||
|
\end{center}%
|
||||||
|
\end{multicols}%
|
||||||
|
%
|
||||||
|
%%----- TABBING : end ----------
|
||||||
|
\end{document}
|
||||||
|
% vim: foldmethod=marker foldmarker=[[[,]]]
|
1298
.config/nvim/plugged/bash-support.vim/doc/bashsupport.txt
Normal file
1298
.config/nvim/plugged/bash-support.vim/doc/bashsupport.txt
Normal file
File diff suppressed because it is too large
Load Diff
136
.config/nvim/plugged/bash-support.vim/doc/tags
Normal file
136
.config/nvim/plugged/bash-support.vim/doc/tags
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
Bash_ResetMapLeader() bashsupport.txt /*Bash_ResetMapLeader()*
|
||||||
|
Bash_SetMapLeader() bashsupport.txt /*Bash_SetMapLeader()*
|
||||||
|
bash-support bashsupport.txt /*bash-support*
|
||||||
|
bashsupport bashsupport.txt /*bashsupport*
|
||||||
|
bashsupport-Ctrl-j bashsupport.txt /*bashsupport-Ctrl-j*
|
||||||
|
bashsupport-ad-mappings bashsupport.txt /*bashsupport-ad-mappings*
|
||||||
|
bashsupport-aligned-comm bashsupport.txt /*bashsupport-aligned-comm*
|
||||||
|
bashsupport-also-bash bashsupport.txt /*bashsupport-also-bash*
|
||||||
|
bashsupport-bash-cmdline-args bashsupport.txt /*bashsupport-bash-cmdline-args*
|
||||||
|
bashsupport-cmdline-args bashsupport.txt /*bashsupport-cmdline-args*
|
||||||
|
bashsupport-codesnippets bashsupport.txt /*bashsupport-codesnippets*
|
||||||
|
bashsupport-comm-echo bashsupport.txt /*bashsupport-comm-echo*
|
||||||
|
bashsupport-comm-keywords bashsupport.txt /*bashsupport-comm-keywords*
|
||||||
|
bashsupport-comm-realign bashsupport.txt /*bashsupport-comm-realign*
|
||||||
|
bashsupport-comm-templates bashsupport.txt /*bashsupport-comm-templates*
|
||||||
|
bashsupport-comm-toggle bashsupport.txt /*bashsupport-comm-toggle*
|
||||||
|
bashsupport-comments bashsupport.txt /*bashsupport-comments*
|
||||||
|
bashsupport-custom-files bashsupport.txt /*bashsupport-custom-files*
|
||||||
|
bashsupport-custom-root bashsupport.txt /*bashsupport-custom-root*
|
||||||
|
bashsupport-custom-variables bashsupport.txt /*bashsupport-custom-variables*
|
||||||
|
bashsupport-customization bashsupport.txt /*bashsupport-customization*
|
||||||
|
bashsupport-debugger bashsupport.txt /*bashsupport-debugger*
|
||||||
|
bashsupport-dictionary bashsupport.txt /*bashsupport-dictionary*
|
||||||
|
bashsupport-errorformat bashsupport.txt /*bashsupport-errorformat*
|
||||||
|
bashsupport-hardcopy bashsupport.txt /*bashsupport-hardcopy*
|
||||||
|
bashsupport-help bashsupport.txt /*bashsupport-help*
|
||||||
|
bashsupport-hotkeys bashsupport.txt /*bashsupport-hotkeys*
|
||||||
|
bashsupport-io-redir bashsupport.txt /*bashsupport-io-redir*
|
||||||
|
bashsupport-output bashsupport.txt /*bashsupport-output*
|
||||||
|
bashsupport-pattern bashsupport.txt /*bashsupport-pattern*
|
||||||
|
bashsupport-release-notes bashsupport.txt /*bashsupport-release-notes*
|
||||||
|
bashsupport-run bashsupport.txt /*bashsupport-run*
|
||||||
|
bashsupport-run-script bashsupport.txt /*bashsupport-run-script*
|
||||||
|
bashsupport-snippets bashsupport.txt /*bashsupport-snippets*
|
||||||
|
bashsupport-stat-norm-ins bashsupport.txt /*bashsupport-stat-norm-ins*
|
||||||
|
bashsupport-stat-visual bashsupport.txt /*bashsupport-stat-visual*
|
||||||
|
bashsupport-statements bashsupport.txt /*bashsupport-statements*
|
||||||
|
bashsupport-syntax-check bashsupport.txt /*bashsupport-syntax-check*
|
||||||
|
bashsupport-syntax-check-options bashsupport.txt /*bashsupport-syntax-check-options*
|
||||||
|
bashsupport-system-wide bashsupport.txt /*bashsupport-system-wide*
|
||||||
|
bashsupport-templates bashsupport.txt /*bashsupport-templates*
|
||||||
|
bashsupport-templates-date bashsupport.txt /*bashsupport-templates-date*
|
||||||
|
bashsupport-templates-definition bashsupport.txt /*bashsupport-templates-definition*
|
||||||
|
bashsupport-templates-edit bashsupport.txt /*bashsupport-templates-edit*
|
||||||
|
bashsupport-templates-files bashsupport.txt /*bashsupport-templates-files*
|
||||||
|
bashsupport-templates-jumptags bashsupport.txt /*bashsupport-templates-jumptags*
|
||||||
|
bashsupport-templates-macros bashsupport.txt /*bashsupport-templates-macros*
|
||||||
|
bashsupport-templates-names bashsupport.txt /*bashsupport-templates-names*
|
||||||
|
bashsupport-tests bashsupport.txt /*bashsupport-tests*
|
||||||
|
bashsupport-troubleshooting bashsupport.txt /*bashsupport-troubleshooting*
|
||||||
|
bashsupport-usage-gvim bashsupport.txt /*bashsupport-usage-gvim*
|
||||||
|
bashsupport-usage-vim bashsupport.txt /*bashsupport-usage-vim*
|
||||||
|
bashsupport-windows bashsupport.txt /*bashsupport-windows*
|
||||||
|
bashsupport-xterm bashsupport.txt /*bashsupport-xterm*
|
||||||
|
bashsupport.txt bashsupport.txt /*bashsupport.txt*
|
||||||
|
mmtemplates#core#ChooseStyle() templatesupport.txt /*mmtemplates#core#ChooseStyle()*
|
||||||
|
mmtemplates#core#CreateMaps() templatesupport.txt /*mmtemplates#core#CreateMaps()*
|
||||||
|
mmtemplates#core#CreateMenus() templatesupport.txt /*mmtemplates#core#CreateMenus()*
|
||||||
|
mmtemplates#core#EditTemplateFiles() templatesupport.txt /*mmtemplates#core#EditTemplateFiles()*
|
||||||
|
mmtemplates#core#EscapeMenu() templatesupport.txt /*mmtemplates#core#EscapeMenu()*
|
||||||
|
mmtemplates#core#ExpandText() templatesupport.txt /*mmtemplates#core#ExpandText()*
|
||||||
|
mmtemplates#core#InsertTemplate() templatesupport.txt /*mmtemplates#core#InsertTemplate()*
|
||||||
|
mmtemplates#core#JumpToTag() templatesupport.txt /*mmtemplates#core#JumpToTag()*
|
||||||
|
mmtemplates#core#NewLibrary() templatesupport.txt /*mmtemplates#core#NewLibrary()*
|
||||||
|
mmtemplates#core#ReadTemplates() templatesupport.txt /*mmtemplates#core#ReadTemplates()*
|
||||||
|
mmtemplates#core#ResetMapleader() templatesupport.txt /*mmtemplates#core#ResetMapleader()*
|
||||||
|
mmtemplates#core#Resource() templatesupport.txt /*mmtemplates#core#Resource()*
|
||||||
|
mmtemplates#core#SetMapleader() templatesupport.txt /*mmtemplates#core#SetMapleader()*
|
||||||
|
template-support templatesupport.txt /*template-support*
|
||||||
|
template-support-IncludeFile() templatesupport.txt /*template-support-IncludeFile()*
|
||||||
|
template-support-MenuShortcut() templatesupport.txt /*template-support-MenuShortcut()*
|
||||||
|
template-support-PickFile() templatesupport.txt /*template-support-PickFile()*
|
||||||
|
template-support-PickList() templatesupport.txt /*template-support-PickList()*
|
||||||
|
template-support-Prompt() templatesupport.txt /*template-support-Prompt()*
|
||||||
|
template-support-SetFormat() templatesupport.txt /*template-support-SetFormat()*
|
||||||
|
template-support-SetMacro() templatesupport.txt /*template-support-SetMacro()*
|
||||||
|
template-support-SetPath() templatesupport.txt /*template-support-SetPath()*
|
||||||
|
template-support-SetProperty() templatesupport.txt /*template-support-SetProperty()*
|
||||||
|
template-support-SetStyle() templatesupport.txt /*template-support-SetStyle()*
|
||||||
|
template-support-above templatesupport.txt /*template-support-above*
|
||||||
|
template-support-adv-files templatesupport.txt /*template-support-adv-files*
|
||||||
|
template-support-adv-styles templatesupport.txt /*template-support-adv-styles*
|
||||||
|
template-support-advanced templatesupport.txt /*template-support-advanced*
|
||||||
|
template-support-api templatesupport.txt /*template-support-api*
|
||||||
|
template-support-api-access templatesupport.txt /*template-support-api-access*
|
||||||
|
template-support-api-basic templatesupport.txt /*template-support-api-basic*
|
||||||
|
template-support-api-maps templatesupport.txt /*template-support-api-maps*
|
||||||
|
template-support-api-misc templatesupport.txt /*template-support-api-misc*
|
||||||
|
template-support-append templatesupport.txt /*template-support-append*
|
||||||
|
template-support-backwards templatesupport.txt /*template-support-backwards*
|
||||||
|
template-support-bare templatesupport.txt /*template-support-bare*
|
||||||
|
template-support-basics templatesupport.txt /*template-support-basics*
|
||||||
|
template-support-below templatesupport.txt /*template-support-below*
|
||||||
|
template-support-change-log templatesupport.txt /*template-support-change-log*
|
||||||
|
template-support-cmd-cmd-sct templatesupport.txt /*template-support-cmd-cmd-sct*
|
||||||
|
template-support-cmd-templates templatesupport.txt /*template-support-cmd-templates*
|
||||||
|
template-support-commands templatesupport.txt /*template-support-commands*
|
||||||
|
template-support-contents templatesupport.txt /*template-support-contents*
|
||||||
|
template-support-dict templatesupport.txt /*template-support-dict*
|
||||||
|
template-support-dictionary templatesupport.txt /*template-support-dictionary*
|
||||||
|
template-support-expandmenu templatesupport.txt /*template-support-expandmenu*
|
||||||
|
template-support-hash templatesupport.txt /*template-support-hash*
|
||||||
|
template-support-help-templ templatesupport.txt /*template-support-help-templ*
|
||||||
|
template-support-indent templatesupport.txt /*template-support-indent*
|
||||||
|
template-support-insert templatesupport.txt /*template-support-insert*
|
||||||
|
template-support-intro templatesupport.txt /*template-support-intro*
|
||||||
|
template-support-lib-person templatesupport.txt /*template-support-lib-person*
|
||||||
|
template-support-library templatesupport.txt /*template-support-library*
|
||||||
|
template-support-list templatesupport.txt /*template-support-list*
|
||||||
|
template-support-lists templatesupport.txt /*template-support-lists*
|
||||||
|
template-support-lists-format templatesupport.txt /*template-support-lists-format*
|
||||||
|
template-support-lists-hash templatesupport.txt /*template-support-lists-hash*
|
||||||
|
template-support-map templatesupport.txt /*template-support-map*
|
||||||
|
template-support-menus templatesupport.txt /*template-support-menus*
|
||||||
|
template-support-noindent templatesupport.txt /*template-support-noindent*
|
||||||
|
template-support-nomenu templatesupport.txt /*template-support-nomenu*
|
||||||
|
template-support-novisual templatesupport.txt /*template-support-novisual*
|
||||||
|
template-support-opt-list templatesupport.txt /*template-support-opt-list*
|
||||||
|
template-support-opt-templ templatesupport.txt /*template-support-opt-templ*
|
||||||
|
template-support-options templatesupport.txt /*template-support-options*
|
||||||
|
template-support-sc templatesupport.txt /*template-support-sc*
|
||||||
|
template-support-shortcut templatesupport.txt /*template-support-shortcut*
|
||||||
|
template-support-start templatesupport.txt /*template-support-start*
|
||||||
|
template-support-syntax templatesupport.txt /*template-support-syntax*
|
||||||
|
template-support-syntax-cmd templatesupport.txt /*template-support-syntax-cmd*
|
||||||
|
template-support-syntax-list templatesupport.txt /*template-support-syntax-list*
|
||||||
|
template-support-syntax-templ templatesupport.txt /*template-support-syntax-templ*
|
||||||
|
template-support-templ-macro templatesupport.txt /*template-support-templ-macro*
|
||||||
|
template-support-templ-maps templatesupport.txt /*template-support-templ-maps*
|
||||||
|
template-support-templ-place templatesupport.txt /*template-support-templ-place*
|
||||||
|
template-support-templ-predef templatesupport.txt /*template-support-templ-predef*
|
||||||
|
template-support-templ-tags templatesupport.txt /*template-support-templ-tags*
|
||||||
|
template-support-templ-visual templatesupport.txt /*template-support-templ-visual*
|
||||||
|
template-support-templates templatesupport.txt /*template-support-templates*
|
||||||
|
template-support-visual templatesupport.txt /*template-support-visual*
|
||||||
|
templatesupport.txt templatesupport.txt /*templatesupport.txt*
|
0
.config/nvim/plugged/bash-support.vim/doc/tags-te
Normal file
0
.config/nvim/plugged/bash-support.vim/doc/tags-te
Normal file
2368
.config/nvim/plugged/bash-support.vim/doc/templatesupport.txt
Normal file
2368
.config/nvim/plugged/bash-support.vim/doc/templatesupport.txt
Normal file
File diff suppressed because it is too large
Load Diff
43
.config/nvim/plugged/bash-support.vim/ftplugin/sh.vim
Normal file
43
.config/nvim/plugged/bash-support.vim/ftplugin/sh.vim
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
" Vim filetype plugin file
|
||||||
|
"
|
||||||
|
" Language : bash
|
||||||
|
" Plugin : bash-support.vim
|
||||||
|
" Maintainer : Fritz Mehner <mehner@fh-swf.de>
|
||||||
|
"
|
||||||
|
" -----------------------------------------------------------------
|
||||||
|
"
|
||||||
|
" Only do this when not done yet for this buffer
|
||||||
|
"
|
||||||
|
if exists("b:did_BASH_ftplugin")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_BASH_ftplugin = 1
|
||||||
|
"
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
" Avoid a wrong syntax highlighting for $(..) and $((..))
|
||||||
|
"------------------------------------------------------------------------------
|
||||||
|
let b:is_bash = 1
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" additional mapping : single quotes around a Word (non-whitespaces)
|
||||||
|
" masks the normal mode command '' (jump to the position
|
||||||
|
" before the latest jump)
|
||||||
|
" additional mapping : double quotes around a Word (non-whitespaces)
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
nnoremap <buffer> '' ciW''<Esc>P
|
||||||
|
nnoremap <buffer> "" ciW""<Esc>P
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" set "maplocalleader" as configured using "g:BASH_MapLeader"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
call Bash_SetMapLeader ()
|
||||||
|
"
|
||||||
|
" maps defined here will use "g:BASH_MapLeader" as <LocalLeader>
|
||||||
|
" example:
|
||||||
|
"map <buffer> <LocalLeader>eg :echo "Example Map :)"<CR>
|
||||||
|
"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" reset "maplocalleader"
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
call Bash_ResetMapLeader ()
|
||||||
|
"
|
1879
.config/nvim/plugged/bash-support.vim/plugin/bash-support.vim
Normal file
1879
.config/nvim/plugged/bash-support.vim/plugin/bash-support.vim
Normal file
File diff suppressed because it is too large
Load Diff
94
.config/nvim/plugged/bash-support.vim/syntax/template.vim
Normal file
94
.config/nvim/plugged/bash-support.vim/syntax/template.vim
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: mm template engine : template library
|
||||||
|
" Maintainer: Wolfgang Mehner <wolfgang-mehner@web.de>
|
||||||
|
" Last Change: 12.08.2013
|
||||||
|
" Version: 0.9.1-2
|
||||||
|
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
" Syntax
|
||||||
|
"-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" comment
|
||||||
|
syn match Comment "^§.*$"
|
||||||
|
syn match Comment "\%(==\)\@<=[^=]*$"
|
||||||
|
|
||||||
|
" templates, lists, ...
|
||||||
|
syn match Structure "^==\s*\%(TEMPLATE:\)\?[a-zA-Z0-9\-+.,_ ]\+==\%(.\+==\)\?"
|
||||||
|
syn match Structure "^==\s*ENDTEMPLATE\s*=="
|
||||||
|
|
||||||
|
syn match Structure "^==\s*HELP:[a-zA-Z0-9\-+.,_ ]\+==\%(.\+==\)\?"
|
||||||
|
|
||||||
|
syn match Structure "^==\s*SEP:[a-zA-Z0-9\-+.,_ ]\+=="
|
||||||
|
|
||||||
|
syn match Structure "^==\s*LIST:\s*[a-zA-Z0-9_]\+\s*==\%(.\+==\)\?"
|
||||||
|
syn match Structure "^==\s*ENDLIST\s*=="
|
||||||
|
|
||||||
|
" style sections
|
||||||
|
syn match Statement "^==\s*IF\s\+|STYLE|\s\+IS\s\+[a-zA-Z0-9_]\+\s*=="
|
||||||
|
syn match Statement "^==\s*ENDIF\s*=="
|
||||||
|
|
||||||
|
syn match Statement "^==\s*USE\s\+STYLES\s*:[a-zA-Z0-9_, ]\+=="
|
||||||
|
syn match Statement "^==\s*ENDSTYLES\s*=="
|
||||||
|
|
||||||
|
" functions: command mode
|
||||||
|
syn match Function "IncludeFile\ze\s*("
|
||||||
|
syn match Function "SetFormat\ze\s*("
|
||||||
|
syn match Function "SetMacro\ze\s*("
|
||||||
|
syn match Function "SetStyle\ze\s*("
|
||||||
|
syn match Function "SetSyntax\ze\s*("
|
||||||
|
syn match Function "SetPath\ze\s*("
|
||||||
|
|
||||||
|
syn match Function "MenuShortcut\ze\s*("
|
||||||
|
syn match Function "SetProperty\ze\s*("
|
||||||
|
syn match Function "SetMap\ze\s*("
|
||||||
|
syn match Function "SetShortcut\ze\s*("
|
||||||
|
|
||||||
|
" functions: standard template
|
||||||
|
syn match Function "|\zsDefaultMacro\ze("
|
||||||
|
syn match Function "|\zsPrompt\ze("
|
||||||
|
syn match Function "|\zsPickFile\ze("
|
||||||
|
syn match Function "|\zsPickList\ze("
|
||||||
|
syn match Function "|\zsSurroundWith\ze("
|
||||||
|
syn match Function "|\zsInsert\ze("
|
||||||
|
syn match Function "|\zsInsertLine\ze("
|
||||||
|
|
||||||
|
syn match Comment "|C(.\{-})|"
|
||||||
|
syn match Comment "|Comment(.\{-})|"
|
||||||
|
|
||||||
|
" functions: picker
|
||||||
|
syn match Function "|\zsPath\ze(" " file
|
||||||
|
syn match Function "|\zsGetPath\ze(" " file
|
||||||
|
syn match Function "|\zsKeepPath\ze(" " file
|
||||||
|
syn match Function "|\zsRemovePath\ze(" " file
|
||||||
|
syn match Function "|\zsList\ze(" " list
|
||||||
|
syn match Function "|\zsGetList\ze(" " list
|
||||||
|
|
||||||
|
" functions: help
|
||||||
|
syn match Function "|\zsPrompt\ze("
|
||||||
|
syn match Function "|\zsWord\ze("
|
||||||
|
syn match Function "|\zsPattern\ze("
|
||||||
|
syn match Function "|\zsDefault\ze("
|
||||||
|
syn match Function "|\zsSubstitute\ze("
|
||||||
|
syn match Function "|\zsLiteralSub\ze("
|
||||||
|
syn match Function "|\zsSystem\ze("
|
||||||
|
syn match Function "|\zsVim\ze("
|
||||||
|
|
||||||
|
" strings, macros, tags, jump targets
|
||||||
|
syn match String "'\%([^']\|''\)*'"
|
||||||
|
syn match String "\"\%([^\\]\|\\.\)*\""
|
||||||
|
|
||||||
|
syn match Tag "|?\?[a-zA-Z][a-zA-Z0-9_:]*|"
|
||||||
|
syn match Tag "<CURSOR>\|{CURSOR}"
|
||||||
|
syn match Tag "<SPLIT>"
|
||||||
|
syn match Tag "<CONTENT>"
|
||||||
|
|
||||||
|
syn match Search "<\([+-]\)\w*\1>"
|
||||||
|
syn match Search "{\([+-]\)\w*\1}"
|
||||||
|
|
||||||
|
let b:current_syntax = "template"
|
Loading…
Reference in New Issue
Block a user