Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
587b5545
Commit
587b5545
authored
May 16, 2020
by
Marc Cornellà
Browse files
zsh-navigation-tools: update to 5937e57e
Fixes #8476
parent
fd786291
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
plugins/zsh-navigation-tools/LICENSE
View file @
587b5545
...
...
@@ -27,7 +27,7 @@ GPLv3 License
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http
s
://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
...
...
@@ -671,7 +671,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http
s
://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
...
...
@@ -690,11 +690,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http
s
://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http
s
://www.gnu.org/philosophy/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
plugins/zsh-navigation-tools/Makefile
0 → 100644
View file @
587b5545
NAME
=
zsh-navigation-tools
INSTALL
?=
install
-c
PREFIX
?=
/usr/local
SHARE_DIR
?=
$(DESTDIR)$(PREFIX)
/share/
$(NAME)
DOC_DIR
?=
$(DESTDIR)$(PREFIX)
/share/doc/
$(NAME)
all
:
install
:
$(INSTALL)
-d
$(SHARE_DIR)
$(INSTALL)
-d
$(SHARE_DIR)
/.config
$(INSTALL)
-d
$(SHARE_DIR)
/.config/znt
$(INSTALL)
-d
$(DOC_DIR)
cp
zsh-navigation-tools.plugin.zsh _n-kill doc/znt-tmux.zsh
$(SHARE_DIR)
cp
README.md NEWS LICENSE doc/img/n-history2.png
$(DOC_DIR)
if
[
x
"true"
=
x
"
`
git rev-parse
--is-inside-work-tree
2>/dev/null
`
"
]
;
then
\
git rev-parse HEAD
;
\
else
\
cat
.revision-hash
;
\
fi
>
$(SHARE_DIR)
/.revision-hash
:
for
fname
in
n-
*
;
do
cp
"
$$
fname"
$(SHARE_DIR)
;
done
;
\
for
fname
in
znt-
*
;
do
cp
"
$$
fname"
$(SHARE_DIR)
;
done
;
\
for
fname
in
.config/znt/n-
*
;
do
cp
"
$$
fname"
$(SHARE_DIR)
/.config/znt
;
done
;
uninstall
:
rm
-f
$(SHARE_DIR)
/.revision-hash
$(SHARE_DIR)
/_
*
$(SHARE_DIR)
/zsh-
*
$(SHARE_DIR)
/n-
*
$(SHARE_DIR)
/znt-
*
$(SHARE_DIR)
/.config/znt/n-
*
[
-d
$(SHARE_DIR)
/.config/znt
]
&&
rmdir
$(SHARE_DIR)
/.config/znt
||
true
[
-d
$(SHARE_DIR)
/.config
]
&&
rmdir
$(SHARE_DIR)
/.config
||
true
[
-d
$(SHARE_DIR)
]
&&
rmdir
$(SHARE_DIR)
||
true
rm
-f
$(DOC_DIR)
/README.md
$(DOC_DIR)
/LICENSE
$(DOC_DIR)
/n-history2.png
[
-d
$(DOC_DIR)
]
&&
rmdir
$(DOC_DIR)
||
true
.PHONY
:
all install uninstall
plugins/zsh-navigation-tools/README.md
View file @
587b5545
This diff is collapsed.
Click to expand it.
plugins/zsh-navigation-tools/_n-kill
View file @
587b5545
...
...
@@ -10,8 +10,8 @@ integer cygwin=0
local IFS="
"
case "$
OSTYPE
" in
cygwin
*) list=( `command ps -Wa` ); cygwin=1 ;;
case "$
(uname)
" in
CYGWIN
*) list=( `command ps -Wa` ); cygwin=1 ;;
*) list=( `command ps -o pid,uid,command -A` ) ;;
esac
...
...
@@ -36,6 +36,6 @@ for line in "${list[@]}"; do
done
_wanted bits expl "Processes' name bits" \
compadd "$@" -a - words && ret=0
compadd
-M 'm:{a-z}={A-Z}'
"$@" -a - words && ret=0
return "$ret"
plugins/zsh-navigation-tools/n-kill
View file @
587b5545
...
...
@@ -42,8 +42,8 @@ NLIST_NONSELECTABLE_ELEMENTS=( 1 )
type
ps 2>/dev/null 1>&2
||
{
echo
>
&2
"Error:
\`
ps' not found"
;
return
1
}
case
"
$
OSTYPE
"
in
cygwin
*
)
list
=(
`
command
ps
-Wa
`
)
;;
case
"
$
(
uname
)
"
in
CYGWIN
*
)
list
=(
`
command
ps
-Wa
`
)
;;
*
)
list
=(
`
command
ps
-o
pid,uid,command
-A
`
)
;;
esac
...
...
plugins/zsh-navigation-tools/n-list
View file @
587b5545
...
...
@@ -261,6 +261,8 @@ done
last_element
=
"
$#list
"
zcurses clear main redraw
zcurses clear inner redraw
while
((
1
))
;
do
# Do searching (filtering with string)
if
[
-n
"
$NLIST_SEARCH_BUFFER
"
]
;
then
...
...
plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh
View file @
587b5545
#!/usr/bin/env zsh
0
=
"
${
(%)
:-
%N
}
"
# this gives immunity to functionargzero being unset
export
ZNT_REPO_DIR
=
"
${
0
%/*
}
"
#
# No plugin manager is needed to use this file. All that is needed is adding:
# source {where-znt-is}/zsh-navigation-tools.plugin.zsh
#
# to ~/.zshrc.
#
# According to the standard:
# http://zdharma.org/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
0
=
"
${${
ZERO
:-${
0
:#
$ZSH_ARGZERO
}}:-${
(%)
:-
%N
}}
"
0
=
"
${${
(M)0
:#/
*
}:-
$PWD
/
$0
}
"
export
ZNT_REPO_DIR
=
"
${
0
:h
}
"
export
ZNT_CONFIG_DIR
=
"
$HOME
/.config/znt"
#
# Update FPATH if:
# 1. Not loading with a plugin manager
# 2. Not having fpath already updated
#
if
[[
${
zsh_loaded_plugins
[-1]
}
!=
*
/zsh-navigation-tools
&&
-z
${
fpath
[(r)
${
0
:h
}
]
}
]]
then
fpath+
=(
"
${
0
:h
}
"
)
fi
#
# Copy configs
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment