forked from zplug/zplug
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
16 changed files
with
255 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# https://help.github.com/articles/about-codeowners/ | ||
|
||
* @zplug/maintainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
<!-- | ||
**Before Submitting** | ||
Please read this instructions carefully! | ||
1. If it is not reported according to this issue template, it may be closed unconditionally | ||
2. In accordance with "Issue Type", you should uncomment below "EDITING AREA" corresponding the part | ||
3. You checked the [FAQ](https://github.com/zplug/zplug/wiki/FAQ) for common problems. | ||
4. Check your [requirements](https://github.com/zplug/zplug/wiki/FAQ#what-are-the-requirements) are satisfied. | ||
--> | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Env (please complete the following information):** | ||
- `zplug version`: | ||
- `zsh --version`: | ||
- `uname -a`: | ||
|
||
**Minimal zshrc (with less than 30 lines)** | ||
|
||
Create a minimal reproducing set of configurations for this issue. Please remove all unnecessary parts! | ||
|
||
```zsh | ||
source ~/.zplug/init.zsh | ||
|
||
#zplug "foo/bar", tag:baz | ||
#zplug "... | ||
|
||
if zplug check || zplug install; then | ||
zplug load --verbose | ||
fi | ||
``` | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,5 @@ zcompdump.zwc | |
# OS X | ||
.DS_Store | ||
**/.DS_Store | ||
|
||
.ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Sample zshrc | ||
|
||
ZPLUG_SUDO_PASSWORD= | ||
ZPLUG_PROTOCOL=ssh | ||
|
||
source $HOME/.zplug/init.zsh | ||
|
||
zplug "b4b4r07/ultimate", as:theme | ||
zplug 'b4b4r07/zplug-doctor', lazy:yes | ||
zplug 'b4b4r07/zplug-cd', lazy:yes | ||
zplug 'b4b4r07/zplug-rm', lazy:yes | ||
|
||
if ! zplug check --verbose; then | ||
printf "Install? [y/N]: " | ||
if read -q; then | ||
echo; zplug install | ||
fi | ||
echo | ||
fi | ||
|
||
zplug load | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM ubuntu:xenial | ||
|
||
RUN apt update && apt-get install -y software-properties-common && \ | ||
add-apt-repository -y ppa:jonathonf/vim && \ | ||
apt-get update && apt-get install -y locales build-essential openssh-server git vim zsh tmux curl unzip sudo && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
|
||
RUN groupadd -g 1000 zplug && \ | ||
useradd -g zplug -G sudo -m -s /bin/zsh zplug && \ | ||
echo 'zplug:zplug' | chpasswd | ||
|
||
# .ssh dir needs to be copied from your home | ||
ADD .ssh /home/zplug/.ssh | ||
|
||
ADD . /home/zplug/.zplug | ||
|
||
RUN chown -R zplug:zplug /home/zplug | ||
RUN chmod 600 /home/zplug/.ssh/id_rsa | ||
|
||
USER zplug | ||
WORKDIR /home/zplug | ||
|
||
CMD ["/bin/zsh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/usr/bin/env zsh | ||
# Description: | ||
# Display the help message | ||
|
||
local f arg | ||
local -a fs args | ||
|
||
local -A opts cmds | ||
local obj opt cmd | ||
local -i max=0 | ||
|
||
while (( $# > 0 )) | ||
do | ||
arg="$1" | ||
case "$arg" in | ||
-*|--*) | ||
break | ||
;; | ||
"") | ||
;; | ||
*) | ||
fs=( "$(echo $ZPLUG_HOME/doc/man/man(1|5)/(zplug-|)${arg}.(1|5)(N))" ) | ||
# Non-existing man page | ||
if [[ $fs[1] == "" ]]; then | ||
__zplug::io::print::f \ | ||
--die \ | ||
--zplug \ | ||
"$arg: no such subcommand or tag\n" | ||
return 1 | ||
fi | ||
# List all hits pages | ||
for f in "${fs[@]}" | ||
do | ||
if [[ -f $f ]]; then | ||
args+=( "$f" ) | ||
fi | ||
done | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
if (( $#args > 0 )); then | ||
man "${args[@]}" | ||
return $status | ||
fi | ||
|
||
# Measure max length | ||
{ | ||
cmds=( "${(kv)_zplug_commands[@]}" ) | ||
for opt in "${(k)_zplug_options[@]}" | ||
do | ||
opts[--$opt]="$_zplug_options[$opt]" | ||
done | ||
|
||
for obj in "${(k)cmds[@]}" "${(k)opts[@]}" | ||
do | ||
if (( $#obj > $max )); then | ||
max=$#obj | ||
fi | ||
done | ||
} | ||
|
||
# Help message format | ||
{ | ||
printf "usage: zplug [OPTIONS] [COMMANDS [options] [args]]\n" | ||
printf " zplug is a next-generation plugin manager for zsh\n" | ||
|
||
for obj in \ | ||
OPTIONS "${(k)opts[@]}" \ | ||
COMMANDS "${(k)cmds[@]}"; do \ | ||
case "$obj" in | ||
OPTIONS | COMMANDS) | ||
printf "\n$obj:\n" | ||
;; | ||
*) | ||
desc="(None)" | ||
[[ -n $opts[$obj] ]] && desc="$opts[$obj]" | ||
[[ -n $cmds[$obj] ]] && desc="$cmds[$obj]" | ||
printf " %-${max}s %s\n" \ | ||
"$obj" \ | ||
"$desc" | ||
;; | ||
esac | ||
done | ||
printf "\n" | ||
} >&2 | ||
|
||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,4 +86,4 @@ fi | |
printf "\n" | ||
} >&2 | ||
|
||
return 1 | ||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
cp -R ~/.ssh .ssh | ||
|
||
docker build -t zplug -f Dockerfile . | ||
|
||
rm -rf .ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
zshrc_path=${1:-${PWD}/.zshrc} | ||
|
||
docker run --rm -v $zshrc_path:/home/zplug/.zshrc -it zplug |