Skip to content

Commit

Permalink
Merge branch 'release/0.1.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
StreakyCobra committed Jul 20, 2015
2 parents 9a390f4 + 32a0c8d commit bf9edfd
Show file tree
Hide file tree
Showing 7 changed files with 275 additions and 74 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.1.8
=====

* A second argument can be given to limit the command to a specific
subfolder of the workspace
* Parsing of the config files is cached to speedup the execution

0.1.6
=====

Expand Down
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,18 @@ Installation
* You can put it directly in `/bin` as root user, but it is complicated to
keep it up-to-date.

* Otherwise, it is also possible to put it in your home folder, for example
in `~/.local/bin`. But you have to be sure that this folder is in your
`$PATH`. (I should also suggest you to have a look at
[peru](https://github.com/buildinspace/peru) which permits to keep files
from different sources up to date with one command).

* For `bash` you can include any directory on your `$PATH` by
including `export PATH="$PATH:/path/to/scripts/dir"` in your
`~/.bashrc` file.
* It is also possible to put it in your home folder, for example in
`~/.local/bin`. You have to be sure that this folder is in your `$PATH`. For
`bash` you can include any directory on your `$PATH` by including `export
PATH="$PATH:/path/to/scripts/dir"` in your `~/.bashrc` file.

* On Mac OS X, it may be necessary to upgrade bash to have a version `> 4.0`.
It could be done with: `brew install bash`.

On a side note, I could also suggest you to have a look at
[peru](https://github.com/buildinspace/peru) which permits to keep files from
different sources up to date with one command.

QuickStart
----------

Expand Down Expand Up @@ -209,27 +208,27 @@ Syntaxes

One project per line. Must be of the form:

any/folder/name | url
<any/folder/path> | <remote_url1> <remote_name1> [ | <remote_url2> <remote_name2> [ | ... ]]

knowing that:

or
* The `<remote_name1>` can be skipped and `origin` will be used instead

any/folder/name | url | upstream_url
* The `<remote_name2>` can be skipped and `upstream` will be used instead

knowing that:
* There must be at least one `<remote_name>` mapping to `origin`

* There can also be blank lines, comments or inline comments. Comments start
with `#` until the end of the line.

* The *name* can be any valid linux folder name not containing `|` or `#`.

* The *urls* are passed to git as-is, so can be anything accepted by git, but
must not contain `|` or `#`. For instance if you have SSH aliases in your
config they are accepted.
* The *folder paths* can be any valid linux folder path not containing `|`, `#`
or spaces.

* The *url* will be used for cloning the repository, thus mapped to the
`origin` remote.
* The *remote names* can be any string not containing `|`, `#` or spaces.

* The *upstream_url* will be mapped to the `upstream` remote in git.
* The *remote urls* are passed to git as-is, so can be anything accepted by git,
but must not contain `|`, `#` or spaces. For instance if you have SSH aliases
in your config they are accepted.

### .ignore.gws

Expand Down
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* Permit a second command-line argument to restrict the folder (e.g. gws update work, gws status ., ...)
* Check command: ignore recursively folder containing a workspace (.projects.gws)
12 changes: 10 additions & 2 deletions completions/bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
_gws()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=( $(compgen -W "init update status fetch ff check" -- $cur) )

case $COMP_CWORD in
1) COMPREPLY=( $(compgen -S " " -W "init update status fetch ff check" -- $cur) $(compgen -S "/" -A directory -- "$cur") )
;;
2) COMPREPLY=( $(compgen -S "/" -A directory -- "$cur") )
;;
esac

compopt -o nospace;
}

complete -F _gws gws
complete -F _gws gws
6 changes: 5 additions & 1 deletion completions/zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#compdef gws
# Zsh completion for gws

_arguments "1: :(init update status fetch ff check)"
_path_or_command(){
_alternative 'cmds:commands:(init update status fetch ff check)' 'files:filenames:_path_files -/'
}

_arguments "1::path or command:_path_or_command" "2::filenames:_path_files -/"
Loading

0 comments on commit bf9edfd

Please sign in to comment.