Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2.0 #49

Merged
merged 81 commits into from
Mar 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
934cfc7
Add manpath command
molovo Feb 18, 2017
16dbafe
Merge pull request #48 from zulu-zsh/add_manpath_command
molovo Feb 18, 2017
e0ad555
Unset the ZVM_AUTO_USE env var when doing package upgrades
molovo Feb 21, 2017
11d4c44
Populate $cdpath and $manpath on init
molovo Feb 19, 2017
46a3397
Merge pull request #50 from zulu-zsh/ignore_zvm_auto_use_hook
Feb 21, 2017
c07e0d1
Perform startup update checks asynchronously
molovo Feb 21, 2017
eba7735
Merge pull request #51 from zulu-zsh/asynchronous_update_check
Feb 21, 2017
a00611a
Fix array assignment errors (in ZSH 5.0) within cdpath command
molovo Feb 16, 2017
8d62f77
Only perform asynchronous updates in ZSH >5.1
molovo Feb 21, 2017
cc52325
Ensure contents of path, fpath and cdpath are unique
molovo Feb 16, 2017
96dc673
Add a post_install step for packages
molovo Feb 25, 2017
d758840
Merge pull request #53 from zulu-zsh/fix_startup_hang
Feb 21, 2017
4c40427
Merge pull request #58 from zulu-zsh/add_post_install_step
Feb 25, 2017
4d075b0
Compile zulu source and package files
molovo Feb 25, 2017
7180d25
Add --depth=1 and --shallow-submodules options to the git clone when …
molovo Feb 24, 2017
379f2f0
Merge pull request #56 from zulu-zsh/experimenting_with_compiling
Feb 25, 2017
8600667
Merge pull request #57 from zulu-zsh/shallow_clones
Feb 25, 2017
6faa801
Don't store new theme unless it is selected correctly
molovo Feb 27, 2017
9b7191b
Mod self-update command to work on any branch and preserve local changes
molovo Feb 28, 2017
6f5bddf
Disable the progress spinner if $ZULU_NO_PROGRESS is set to 1
molovo Feb 28, 2017
f1b0c72
Remove stray echo in post-install step
molovo Feb 28, 2017
3a2754d
Add new -y|--no-confirmation options to zulu upgrade
molovo Feb 28, 2017
48ef31b
Perform a safer rebase when updating packages
molovo Feb 28, 2017
7cf63ee
Perform a safer rebase when updating index
molovo Feb 28, 2017
6e26219
Allow list results to be filtered by package type
molovo Feb 28, 2017
560f166
Add completion for theme command
molovo Feb 28, 2017
76c2b7c
Fix typo which prevented completion caching from working
molovo Mar 1, 2017
404b048
Fix integer comparisons in self-update, update and upgrade commands
molovo Mar 1, 2017
54372ea
Allow environment variables to marked as 'private', and stored in a s…
molovo Mar 3, 2017
b6785c4
Merge pull request #62 from zulu-zsh/private_env_vars
Mar 3, 2017
4ecb751
Add --dev flag to zulu init
molovo Mar 6, 2017
cb9609a
Merge pull request #64 from zulu-zsh/add_dev_flag_to_init
Mar 6, 2017
4c75f57
Add build badges
molovo Feb 16, 2017
717561c
Add tests for path, fpath and cdpath commands
molovo Feb 16, 2017
7e718c2
Fix release badge in README
molovo Feb 16, 2017
17a94c8
Fix issues with array handling in tests in ZSH 5.0
molovo Feb 16, 2017
42457ec
Add tests for manpath command
molovo Feb 19, 2017
9c1d194
Enable travis build on multiple versions using ZVM
molovo Feb 19, 2017
cf66d7b
Add .zvmrc
molovo Feb 20, 2017
4eb5c95
Disable email notifications for travis builds
molovo Feb 21, 2017
d3c3878
Skip tests which manipulate $manpath on OSX
molovo Feb 22, 2017
5a085c6
WIP: Add tests for alias and var commands
molovo Feb 22, 2017
54fec08
Run build step before running tests
molovo Feb 24, 2017
bf02bc5
Add tests for theme command
molovo Feb 27, 2017
1a2dae1
Temporarily disable alias and var tests
molovo Feb 28, 2017
483706b
Add tests for self-update command
molovo Feb 28, 2017
20b5839
Ensure an upstream is set in CI environment
molovo Feb 28, 2017
b5a57bb
Allow self-update tests to skip if an upstream is not configured
molovo Feb 28, 2017
50fe2bb
Fix regex in theme test
molovo Feb 28, 2017
8bc2ece
Add a comment
molovo Feb 28, 2017
c1f99e5
Add tests for upgrade command
molovo Feb 28, 2017
ebfdd14
Add tests for update command
molovo Feb 28, 2017
6d64310
Mod .travis.yml to support new version of ZUnit
molovo Mar 1, 2017
bd856c7
Switch zvm default version
molovo Mar 1, 2017
9fa5b0d
Try setting $ZULU_NO_PROGESS in Travis env
molovo Mar 1, 2017
67b2f4e
Use zunit release rather than master
molovo Mar 2, 2017
9c7e640
Ensure $IFS is set to the default
molovo Mar 2, 2017
19ef0c4
Ensure IFS is assigned safely in path commands
molovo Mar 2, 2017
73e9015
Fix case in update command tests
molovo Mar 2, 2017
6ba9fa0
Set the value of IFS properly
molovo Mar 2, 2017
b5663c3
Always register zulu internal functions, even if they already exist
molovo Mar 2, 2017
170e505
Build zulu in bootstrap script, if it hasn't been done already
molovo Mar 2, 2017
b3021bb
Attempting to cache zvm directories
molovo Mar 2, 2017
8e62320
Cache apt packages
molovo Mar 2, 2017
92abbef
Add tests for install and uninstall commands
molovo Mar 3, 2017
c2dbf90
Improve error handling in install command
molovo Mar 3, 2017
c9a5795
Remove unsupported --shallow-submodules option from clone
molovo Mar 3, 2017
e159ff8
Ensure EDITOR is word split in case options are included
molovo Mar 3, 2017
83a0804
Add tests for func command
molovo Mar 3, 2017
abdda99
Don't strip blank lines from the compiled script
molovo Mar 3, 2017
4eccdc8
Update func test
molovo Mar 3, 2017
75fff01
Improve error handling in uninstall command
molovo Mar 3, 2017
b47e6d0
Improve tests for install and uninstall commands
molovo Mar 3, 2017
afa063a
Add test for bundle command
molovo Mar 3, 2017
d71800a
Fix uninstall test
molovo Mar 3, 2017
00ddb82
Simplify use of output variable in tests
molovo Mar 7, 2017
8841a07
Add tests for list command
molovo Mar 7, 2017
cf1006d
Finish tests for var command
molovo Mar 8, 2017
f218919
Finish tests for alias command
molovo Mar 8, 2017
423411a
Merge pull request #47 from zulu-zsh/unit_testing
Mar 8, 2017
7f80ab0
Bump version
molovo Mar 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore files generated by nested Zulu install
tests/_support/.config/*
tests/_support/.zulu/*
tests/_support/zulu-install.zsh

# Ignore output
tests/_output/*
!tests/_output/.gitkeep

/zulu
*.zwc
5 changes: 5 additions & 0 deletions .guardian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
files: ./tests/commands/**/*
run: zunit "%file%"
---
files: ./src/**/*.zsh
run: ./build.zsh
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
addons:
apt:
packages:
- zsh
- ncurses-dev
- autoconf
- yodl
- man
cache:
apt: true
directories:
- $HOME/.zvm
dist: trusty
matrix:
include:
- env: ZVM_VERSION='5.0.8'
- env: ZVM_VERSION='5.1.1'
- env: ZVM_VERSION='5.2'
- env: ZVM_VERSION='5.3.1'
install:
- if [[ $(ls "$HOME/.zvm" | wc -l) -eq 0 ]]; then rm -rf "$HOME/.zvm"; fi
- mkdir .bin
- curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > .bin/revolver
- curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > .bin/color
- curl -L https://raw.githubusercontent.com/molovo/zvm/master/zvm > .bin/zvm
- curl -L https://github.com/molovo/zunit/releases/download/v0.6.3/zunit > .bin/zunit
- chmod u+x .bin/{color,revolver,zunit,zvm}
- export PATH="$HOME/.zvm/bin:$PWD/.bin:$PATH"
before_script:
- zvm use ${ZVM_VERSION}
- ./build.zsh
script: zunit
notifications:
email: false
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.6
1.2.0
5 changes: 5 additions & 0 deletions .zunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tap: false
directories:
tests: tests
output: tests/_output
support: tests/_support
1 change: 1 addition & 0 deletions .zvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.1.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Zulu

[![Join the chat at https://gitter.im/zulu-zsh/zulu](https://badges.gitter.im/zulu-zsh/zulu.svg)](https://gitter.im/zulu-zsh/zulu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the slack community at https://zulu-zsh.slack.com](https://zulu-slack.herokuapp.com/badge.svg)](https://zulu-slack.herokuapp.com)
Zulu: [![GitHub release](https://img.shields.io/github/release/zulu-zsh/zulu.svg)](https://github.com/zulu-zsh/zulu/releases/latest) [![Build Status](https://travis-ci.org/zulu-zsh/zulu.svg?branch=master)](https://travis-ci.org/zulu-zsh/zulu) | Index: [![Build Status](https://travis-ci.org/zulu-zsh/index.svg?branch=master)](https://travis-ci.org/zulu-zsh/index) | [![Join the chat at https://gitter.im/zulu-zsh/zulu](https://badges.gitter.im/zulu-zsh/zulu.svg)](https://gitter.im/zulu-zsh/zulu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the slack community at https://zulu-zsh.slack.com](https://zulu-slack.herokuapp.com/badge.svg)](https://zulu-slack.herokuapp.com)

Thanks for using Zulu. Zulu is a environment manager for ZSH, which aims to make it easy to manage your shell without writing any code.

Expand Down
23 changes: 23 additions & 0 deletions build.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env zsh

# Clear the file to start with
cat /dev/null > zulu

# Start with the shebang
echo "#!/usr/bin/env zsh\n" >> zulu

# We need to do some fancy globbing
setopt EXTENDED_GLOB

# Print each of the source files into the target, removing any comments
# from the compiled executable
cat src/**/(^zulu).zsh | grep -v -E '^(\s*#.*[^"])$' >> zulu

# Print the main command last
cat src/zulu.zsh | grep -v -E '^(\s*#.*[^"])$' >> zulu

# Make sure the file is executable
chmod u+x zulu

# Let the user know we're finished
echo "\033[0;32m✔\033[0;m zulu built successfully"
99 changes: 0 additions & 99 deletions commands/var

This file was deleted.

13 changes: 6 additions & 7 deletions commands/alias → src/commands/alias.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env zsh

###
# Output usage information
###
Expand All @@ -16,7 +14,7 @@ function _zulu_alias_usage() {
###
# Add an alias
###
_zulu_alias_add() {
function _zulu_alias_add() {
local existing alias cmd

alias="$1"
Expand All @@ -31,13 +29,13 @@ _zulu_alias_add() {
echo "alias $alias='$cmd'" >> $aliasfile

zulu alias load
return
echo "$(_zulu_color green '✔') Alias '$alias' added"
}

###
# Remove an alias
###
_zulu_alias_rm() {
function _zulu_alias_rm() {
local existing alias

alias="$1"
Expand All @@ -50,14 +48,15 @@ _zulu_alias_rm() {

echo "$(cat $aliasfile | grep -v "alias $alias=")" >! $aliasfile
unalias $alias

zulu alias load
return
echo "$(_zulu_color green '✔') Alias '$alias' removed"
}

###
# Load aliases
###
_zulu_alias_load() {
function _zulu_alias_load() {
source $aliasfile
}

Expand Down
2 changes: 0 additions & 2 deletions commands/bundle → src/commands/bundle.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env zsh

###
# Print usage information
###
Expand Down
27 changes: 11 additions & 16 deletions commands/cdpath → src/commands/cdpath.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env zsh

###
# Output usage information
###
Expand Down Expand Up @@ -38,8 +36,8 @@ function _zulu_cdpath_parse() {
# Add a directory to $cdpath
###
function _zulu_cdpath_add() {
local dir p paths=($(cat $pathfile))
local -a items
local dir p
local -a items paths; paths=($(cat $pathfile))

# Check that each of the passed directories exist, and convert relative
# paths to absolute
Expand Down Expand Up @@ -72,8 +70,8 @@ function _zulu_cdpath_add() {
# Remove a directory from $cdpath
###
function _zulu_cdpath_rm() {
local dir p paths=($(cat $pathfile))
local -a items
local dir p
local -a items paths; paths=($(cat $pathfile))

# Check that each of the passed directories exist, and convert relative
# paths to absolute
Expand Down Expand Up @@ -108,26 +106,23 @@ function _zulu_cdpath_rm() {
function _zulu_cdpath_store() {
local separator out

# Check that we have all the parameters we need. This will only happen if
# _zulu_cdpath_store is executed internally.
if [[ "$items" = "" || "$pathfile" = "" ]]; then
echo 'Missing parameters. Was _zulu_cdpath_store called from within the add or remove functions?'
return 1
fi

# Separate the array by newlines, and print the contents to the pathfile
separator=$'\n'
local IFS="$separator"; out="${items[*]/#/${separator}}"
local oldIFS=$IFS
IFS="$separator"; out="${items[*]/#/${separator}}"
echo ${out:${#separator}} >! $pathfile
IFS=$oldIFS
unset oldIFS
}

###
# Override the $cdpath variable with the current contents of the pathfile
###
function _zulu_cdpath_reset() {
local separator out paths=($(cat $pathfile))
local separator out
local -a paths; paths=($(cat $pathfile))

cdpath=()
typeset -gUa cdpath; cdpath=()
for p in "${paths[@]}"; do
cdpath+="$p"
done
Expand Down
Loading