From 9d43dc88bbc313921661c8b699e78550a2d86708 Mon Sep 17 00:00:00 2001 From: Eduardo Bizarro Date: Wed, 23 Nov 2016 15:50:14 -0200 Subject: Yarn (https://yarnpkg.com) completion support (#5542) * yarn completion --- plugins/yarn/yarn.plugin.zsh | 81 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 plugins/yarn/yarn.plugin.zsh diff --git a/plugins/yarn/yarn.plugin.zsh b/plugins/yarn/yarn.plugin.zsh new file mode 100644 index 000000000..47c503acb --- /dev/null +++ b/plugins/yarn/yarn.plugin.zsh @@ -0,0 +1,81 @@ +alias yi="yarn install" + +_yarn () +{ + local -a _1st_arguments _dopts _dev _production + local expl + typeset -A opt_args + + _dopts=( + '(--force)--force[This refetches all packages, even ones that were previously installed.]' + ) + + _installopts=( + '(--flat)--flat[Only allow one version of a package. On the first run this will prompt you to choose a single version for each package that is depended on at multiple version ranges.]' + '(--har)--har[Outputs an HTTP archive from all the network requests performed during the installation.]' + '(--no-lockfile)--no-lockfile[Don’t read or generate a yarn.lock lockfile.]' + '(--pure-lockfile)--pure-lockfile[Don’t generate a yarn.lock lockfile.]' + ) + + _dev=('(--dev)--dev[Save installed packages into the project"s package.json devDependencies]') + + _production=('(--production)--production[Do not install project devDependencies]') + + _1st_arguments=( + 'help:Display help information about yarn' \ + 'init:Initialize for the development of a package.' \ + 'add:Add a package to use in your current package.' \ + 'install:Install all the dependencies listed within package.json in the local node_modules folder.' \ + 'publish:Publish a package to a package manager.' \ + 'remove:Remove a package that will no longer be used in your current package.' \ + 'cache:Clear the local cache. It will be populated again the next time yarn or yarn install is run.' \ + 'clean:Frees up space by removing unnecessary files and folders from dependencies.' \ + 'check:Verifies that versions of the package dependencies in the current project’s package.json matches that of yarn’s lock file.' \ + 'ls:List all installed packages.' \ + 'global:Makes binaries available to use on your operating system.' \ + 'info: [] - fetch information about a package and return it in a tree format.' \ + 'outdated:Checks for outdated package dependencies.' \ + 'run:Runs a defined package script.' \ + 'self-update:Updates Yarn to the latest version.' \ + 'upgrade:Upgrades packages to their latest version based on the specified range.' \ + 'why: - Show information about why a package is installed.' + ) + _arguments \ + '*:: :->subcmds' && return 0 + + if (( CURRENT == 1 )); then + _describe -t commands "yarn subcommand" _1st_arguments + return + fi + + case "$words[1]" in + add) + _arguments \ + $_dopts \ + $_dev \ + $_production + ;; + install) + _arguments \ + $_installopts \ + $_dopts \ + $_dev \ + $_no_color \ + $_production + ;; + update) + _arguments \ + $_dopts + ;; + remove) + _arguments \ + $_dopts + ;; + *) + _arguments \ + ;; + esac + +} + +compdef _yarn yarn -- cgit v1.2.3-70-g09d2 From 037764acc366bae0dc0f01c221c7a23ef04d3c83 Mon Sep 17 00:00:00 2001 From: Thomas Paul Mann Date: Mon, 28 Nov 2016 21:08:34 +0100 Subject: Add plugin for Swift Package Manager (#5670) * Add plugin for Swift Package Manager * swift-package-manager: Rename plugin to 'swift-pm' --- plugins/swift-pm/README.md | 22 ++++++++++++++++++++++ plugins/swift-pm/swift-pm.plugin.zsh | 8 ++++++++ 2 files changed, 30 insertions(+) create mode 100644 plugins/swift-pm/README.md create mode 100644 plugins/swift-pm/swift-pm.plugin.zsh diff --git a/plugins/swift-pm/README.md b/plugins/swift-pm/README.md new file mode 100644 index 000000000..8e6a0d5c4 --- /dev/null +++ b/plugins/swift-pm/README.md @@ -0,0 +1,22 @@ +# Swift Package Manager + +## Description + +This plugin provides a few utilities that make you faster on your daily work with the [Swift Package Manager](https://github.com/apple/swift-package-manager). + +To start using it, add the `swift-pm` plugin to your `plugins` array in `~/.zshrc`: + +```zsh +plugins=(... swift-pm) +``` + +## Aliases + +| Alias | Description | Command | +|-------|-------------------------------------|------------------------------------| +| `spi` | Initialize a new package | `swift package init` | +| `spf` | Fetch package dependencies | `swift package fetch` | +| `spu` | Update package dependencies | `swift package update` | +| `spx` | Generates an Xcode project | `swift package generate-xcodeproj` | +| `sps` | Print the resolved dependency graph | `swift package show-dependencies` | +| `spd` | Print parsed Package.swift as JSON | `swift package dump-package` | diff --git a/plugins/swift-pm/swift-pm.plugin.zsh b/plugins/swift-pm/swift-pm.plugin.zsh new file mode 100644 index 000000000..ef872ea34 --- /dev/null +++ b/plugins/swift-pm/swift-pm.plugin.zsh @@ -0,0 +1,8 @@ +# Some aliases to make your life with the Swift Package Manager faster ✌️ + +alias spi='swift package init' +alias spf='swift package fetch' +alias spu='swift package update' +alias spx='swift package generate-xcodeproj' +alias sps='swift package show-dependencies' +alias spd='swift package dump-package' -- cgit v1.2.3-70-g09d2 From 6ee6a734c24b8f2cda43f230142f0f02cfb52fb3 Mon Sep 17 00:00:00 2001 From: Thomas Paul Mann Date: Wed, 30 Nov 2016 00:20:43 +0100 Subject: swift-pm: Rename plugin to 'swiftpm' (#5674) --- plugins/swift-pm/README.md | 22 ---------------------- plugins/swift-pm/swift-pm.plugin.zsh | 8 -------- plugins/swiftpm/README.md | 22 ++++++++++++++++++++++ plugins/swiftpm/swiftpm.plugin.zsh | 8 ++++++++ 4 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 plugins/swift-pm/README.md delete mode 100644 plugins/swift-pm/swift-pm.plugin.zsh create mode 100644 plugins/swiftpm/README.md create mode 100644 plugins/swiftpm/swiftpm.plugin.zsh diff --git a/plugins/swift-pm/README.md b/plugins/swift-pm/README.md deleted file mode 100644 index 8e6a0d5c4..000000000 --- a/plugins/swift-pm/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Swift Package Manager - -## Description - -This plugin provides a few utilities that make you faster on your daily work with the [Swift Package Manager](https://github.com/apple/swift-package-manager). - -To start using it, add the `swift-pm` plugin to your `plugins` array in `~/.zshrc`: - -```zsh -plugins=(... swift-pm) -``` - -## Aliases - -| Alias | Description | Command | -|-------|-------------------------------------|------------------------------------| -| `spi` | Initialize a new package | `swift package init` | -| `spf` | Fetch package dependencies | `swift package fetch` | -| `spu` | Update package dependencies | `swift package update` | -| `spx` | Generates an Xcode project | `swift package generate-xcodeproj` | -| `sps` | Print the resolved dependency graph | `swift package show-dependencies` | -| `spd` | Print parsed Package.swift as JSON | `swift package dump-package` | diff --git a/plugins/swift-pm/swift-pm.plugin.zsh b/plugins/swift-pm/swift-pm.plugin.zsh deleted file mode 100644 index ef872ea34..000000000 --- a/plugins/swift-pm/swift-pm.plugin.zsh +++ /dev/null @@ -1,8 +0,0 @@ -# Some aliases to make your life with the Swift Package Manager faster ✌️ - -alias spi='swift package init' -alias spf='swift package fetch' -alias spu='swift package update' -alias spx='swift package generate-xcodeproj' -alias sps='swift package show-dependencies' -alias spd='swift package dump-package' diff --git a/plugins/swiftpm/README.md b/plugins/swiftpm/README.md new file mode 100644 index 000000000..07ca25651 --- /dev/null +++ b/plugins/swiftpm/README.md @@ -0,0 +1,22 @@ +# Swift Package Manager + +## Description + +This plugin provides a few utilities that make you faster on your daily work with the [Swift Package Manager](https://github.com/apple/swift-package-manager). + +To start using it, add the `swiftpm` plugin to your `plugins` array in `~/.zshrc`: + +```zsh +plugins=(... swiftpm) +``` + +## Aliases + +| Alias | Description | Command | +|-------|-------------------------------------|------------------------------------| +| `spi` | Initialize a new package | `swift package init` | +| `spf` | Fetch package dependencies | `swift package fetch` | +| `spu` | Update package dependencies | `swift package update` | +| `spx` | Generates an Xcode project | `swift package generate-xcodeproj` | +| `sps` | Print the resolved dependency graph | `swift package show-dependencies` | +| `spd` | Print parsed Package.swift as JSON | `swift package dump-package` | diff --git a/plugins/swiftpm/swiftpm.plugin.zsh b/plugins/swiftpm/swiftpm.plugin.zsh new file mode 100644 index 000000000..ef872ea34 --- /dev/null +++ b/plugins/swiftpm/swiftpm.plugin.zsh @@ -0,0 +1,8 @@ +# Some aliases to make your life with the Swift Package Manager faster ✌️ + +alias spi='swift package init' +alias spf='swift package fetch' +alias spu='swift package update' +alias spx='swift package generate-xcodeproj' +alias sps='swift package show-dependencies' +alias spd='swift package dump-package' -- cgit v1.2.3-70-g09d2 From 937a7f66ef852c2d2a5da7907504f6d61ed92433 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Thu, 8 Dec 2016 02:10:18 +0100 Subject: Precise Unix-based wording Closes #5681 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eecde1551..d56534977 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To learn more, visit [ohmyz.sh](http://ohmyz.sh) and follow [@ohmyzsh](https://t __Disclaimer:__ _Oh My Zsh works best on macOS and Linux._ -* Unix-based operating system (macOS or Linux) +* Unix-like operating system (macOS or Linux) * [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH) * `curl` or `wget` should be installed * `git` should be installed -- cgit v1.2.3-70-g09d2 From 26aae6b5834e1342d9b95a894a5bb24159b367bf Mon Sep 17 00:00:00 2001 From: Rarylson Freitas Date: Thu, 8 Dec 2016 18:49:58 -0200 Subject: Fix (plugins debian and ubuntu): `apt-history list` using `zgrep` (#5695) Changing from `zcat` to `zgrep` because some `zcat` implementations do not work if the file is not compressed. --- plugins/debian/debian.plugin.zsh | 2 +- plugins/ubuntu/ubuntu.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 31a772d60..28131ff80 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -192,7 +192,7 @@ apt-history () { awk '{print $4"="$5}' ;; list) - zcat $(ls -rt /var/log/dpkg*) + zgrep --no-filename '' $(ls -rt /var/log/dpkg*) ;; *) echo "Parameters:" diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh index ffde284fe..030af0693 100644 --- a/plugins/ubuntu/ubuntu.plugin.zsh +++ b/plugins/ubuntu/ubuntu.plugin.zsh @@ -108,7 +108,7 @@ apt-history () { awk '{print $4"="$5}' ;; list) - zcat $(ls -rt /var/log/dpkg*) + zgrep --no-filename '' $(ls -rt /var/log/dpkg*) ;; *) echo "Parameters:" -- cgit v1.2.3-70-g09d2