diff options
author | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
---|---|---|
committer | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
commit | edc449275b6c04445f58b108ca0937a87c1e8430 (patch) | |
tree | 9fd484d58145b616f29a78857cc0b1c8b1c18f05 /oh-my-zsh/plugins/arcanist | |
parent | 6f5424ca96c4221ef433f545642669e9c104d0ed (diff) |
add zsh
Diffstat (limited to 'oh-my-zsh/plugins/arcanist')
-rw-r--r-- | oh-my-zsh/plugins/arcanist/README.md | 43 | ||||
-rw-r--r-- | oh-my-zsh/plugins/arcanist/arcanist.plugin.zsh | 39 |
2 files changed, 82 insertions, 0 deletions
diff --git a/oh-my-zsh/plugins/arcanist/README.md b/oh-my-zsh/plugins/arcanist/README.md new file mode 100644 index 0000000..07e7669 --- /dev/null +++ b/oh-my-zsh/plugins/arcanist/README.md @@ -0,0 +1,43 @@ +## arcanist + +This plugin adds many useful aliases for [arcanist](https://github.com/phacility/arcanist). + +To use it, add `arcanist` to the plugins array of your zshrc file: + +```zsh +plugins=(... arcanist) +``` + +## Aliases + +| Alias | Command | +| ------- | ---------------------------------- | +| ara | `arc amend` | +| arb | `arc branch` | +| arbl | `arc bland` | +| arco | `arc cover` | +| arci | `arc commit` | +| ard | `arc diff` | +| ardc | `arc diff --create` | +| ardp | `arc diff --preview` | +| ardnu | `arc diff --nounit` | +| ardnupc | `arc diff --nounit --plan-changes` | +| ardpc | `arc diff --plan-changes` | +| are | `arc export` | +| arh | `arc help` | +| arho | `arc hotfix` | +| arl | `arc land` | +| arli | `arc lint` | +| arls | `arc list` | +| arpa | `arc patch` | + +## Functions + +The following functions make copy pasting revision ids from the URL bar of your browser +easier, as they allow for copy pasting the whole URL. For example: `ardu` accepts +both `https://arcanist-url.com/<REVISION>` as well as `<REVISION>`. + +| Function | Command | +| ------------------------- | --------------------------------- | +| ardu [URL or revision_id] | `arc diff --update` [revision_id] | +| arpa [URL or revision_id] | `arc patch` [revision_id] | diff --git a/oh-my-zsh/plugins/arcanist/arcanist.plugin.zsh b/oh-my-zsh/plugins/arcanist/arcanist.plugin.zsh new file mode 100644 index 0000000..380eede --- /dev/null +++ b/oh-my-zsh/plugins/arcanist/arcanist.plugin.zsh @@ -0,0 +1,39 @@ +# +# Aliases +# (sorted alphabetically) +# + +alias ara='arc amend' +alias arb='arc branch' +alias arbl='arc bland' +alias arco='arc cover' +alias arci='arc commit' + +alias ard='arc diff' +alias ardc='arc diff --create' +alias ardnu='arc diff --nounit' +alias ardnupc='arc diff --nounit --plan-changes' +alias ardpc='arc diff --plan-changes' +alias ardp='arc diff --preview' # creates a new diff in the phab interface + +alias are='arc export' +alias arh='arc help' +alias arho='arc hotfix' +alias arl='arc land' +alias arli='arc lint' +alias arls='arc list' + +# +# Functions +# (sorted alphabetically) +# + +ardu() { + # Both `ardu https://arcanist-url.com/<REVISION>`, and `ardu <REVISION>` work. + arc diff --update "${1:t}" +} + +arpa() { + # Both `arpa https://arcanist-url.com/<REVISION>`, and `arpa <REVISION>` work. + arc patch "${1:t}" +} |