forked from sorin-ionescu/prezto
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into production
* master: (46 commits) Allow ssh module to run on OSX Change the zstyle config name for sorin-ionescu#607 Add the ability to specify tmux session name Cache the completion for a quicker startup broken $path and $PATH if nodenv exists (sorin-ionescu#1315) Use the lazy-loaded version of virtualenvwrapper if available Add gbr and gbR aliases to module readme Add some new git aliases, modify a few more. (sorin-ionescu#1301) Add better support for pyenv virtualenvs Convert long-pwd to pwd-length Add zstyle option to show pwd in long format rsync: Update reference to Bombich's rsync page Add support for 'pip', 'pip2', 'pip3' completion Update ssh module for multi session hosts New `alias gfa=git fetch --all` for git module Add utility alias for pydf Add perl-info function & plenv subcommand aliases (sorin-ionescu#1303) archive: add archive function archive: add support for *.jar files (sorin-ionescu#1302) Move python-info call in paradox from preexec to precmd ...
- Loading branch information
Showing
43 changed files
with
1,015 additions
and
104 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,25 @@ | ||
Please check if a similar issue already exists or has been closed before before opening your issue. | ||
|
||
### Description | ||
|
||
[Description of the bug or feature] | ||
|
||
### Expected behavior | ||
|
||
[What you expected to happen] | ||
|
||
### Actual behavior | ||
|
||
[What actually happened] | ||
|
||
### Steps to Reproduce | ||
|
||
1. [First Step] | ||
2. [Second Step] | ||
3. [and so on...] | ||
|
||
### Versions | ||
|
||
- Prezto commit: | ||
- ZSH version: | ||
- OS information: |
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 @@ | ||
Please be sure to check out our [contributing guidelines](https://github.com/sorin-ionescu/prezto/blob/master/CONTRIBUTING.md) before submitting your pull request. | ||
|
||
Fixes # | ||
|
||
## Proposed Changes | ||
|
||
- | ||
- | ||
- |
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
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,67 @@ | ||
#!/usr/bin/env zsh | ||
# | ||
# Creates archive file | ||
# | ||
# Authors: | ||
# Matt Hamilton <m@tthamilton.com> | ||
# | ||
|
||
local archive_name dir_to_archive _gzip_bin _bzip2_bin | ||
|
||
if (( $# != 2 )); then | ||
cat >&2 <<EOF | ||
usage: $0 [archive_name.zip] [/path/to/include/into/archive] | ||
Where 'archive.zip' uses any of the following extensions: | ||
.tar.gz, .tar.bz2, .tar.xz, .tar.lzma, .tar, .zip, .rar, .7z | ||
There is no '-v' switch; all operations are verbose. | ||
EOF | ||
return 1 | ||
fi | ||
|
||
# we are quitting (above) if there are not exactly 2 vars, | ||
# so we don't need any argc check here. | ||
|
||
# strip the path, just in case one is provided for some reason | ||
archive_name="${1:t}" | ||
# use absolute paths, and follow symlinks | ||
dir_to_archive="${2}" | ||
|
||
# if the directory doesn't exist, quit. Nothing to archive | ||
if [[ ! -e "${dir_to_archive}" ]]; then | ||
print "$0: file or directory not valid: ${dir_to_archive}" >&2 | ||
return 1 | ||
fi | ||
|
||
# here, we check for dropin/multi-threaded replacements | ||
# this should eventually be moved to modules/archive/init.zsh | ||
# as a global alias | ||
if (( $+commands[pigz] )); then | ||
_gzip_bin='pigz' | ||
else | ||
_gzip_bin='gzip' | ||
fi | ||
|
||
if (( $+commands[pbzip2] )); then | ||
_bzip2_bin='pbzip2' | ||
else | ||
_bzip2_bin='bzip2' | ||
fi | ||
|
||
case "${archive_name}" in | ||
(*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program="${_gzip_bin}" "${dir_to_archive}" ;; | ||
(*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="${_bzip2_bin}" "${dir_to_archive}" ;; | ||
(*.tar.xz|*.txz) tar -cvJf "${archive_name}" "${dir_to_archive}" ;; | ||
(*.tar.lzma|*.tlz) tar -cvf "${archive_name}" --lzma "${dir_to_archive}" ;; | ||
(*.tar) tar -cvf "${archive_name}" "${dir_to_archive}" ;; | ||
(*.zip|*.jar) zip -r "${archive_name}" "${dir_to_archive}" ;; | ||
(*.rar) rar a "${archive_name}" "${dir_to_archive}" ;; | ||
(*.7z) 7za a "${archive_name}" "${dir_to_archive}" ;; | ||
(*.gz) print "\n.gz is only useful for single files, and does not capture permissions. Use .tar.gz" ;; | ||
(*.bz2) print "\n.bzip2 is only useful for single files, and does not capture permissions. Use .tar.bz2" ;; | ||
(*.xz) print "\n.xz is only useful for single files, and does not capture permissions. Use .tar.xz" ;; | ||
(*.lzma) print "\n.lzma is only useful for single files, and does not capture permissions. Use .tar.lzma" ;; | ||
(*) print "\nunknown archive type for archive: ${archive_name}" ;; | ||
esac |
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
Oops, something went wrong.