1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-25 01:47:25 +08:00

Compare commits

..

No commits in common. "ecf2240b061215224e9502f6c0569dfc66e58ebc" and "314dd205ca6070527a4bef791221755920858bd3" have entirely different histories.

4 changed files with 10 additions and 40 deletions

View File

@ -11,14 +11,13 @@ plugins=(... arcanist)
## Aliases
| Alias | Command |
| ------- | ---------------------------------- |
|---------|------------------------------------|
| ara | `arc amend` |
| arb | `arc branch` |
| 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` |
@ -28,14 +27,3 @@ plugins=(... arcanist)
| 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] |

View File

@ -13,25 +13,10 @@ 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 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}"
}
alias arpa='arc patch'

View File

@ -106,10 +106,10 @@ _knife() {
compadd -Q "$@" show edit list "from file" create delete
;;
bootstrap|clean|cook|prepare)
compadd "$@" nodes/*.json(N:t:r)
compadd "$@" nodes/*.json(N:t:r); done
;;
init)
compadd "$@" ./*(/N:t)
compadd "$@" ./*(/N:t); done
;;
*)
_arguments '3:Subsubcommands:($(_knife_options2))'

View File

@ -47,10 +47,11 @@ if [[ $FOUND_RBENV -eq 1 ]]; then
}
function rbenv_prompt_info() {
local ruby=$(current_ruby) gemset=$(current_gemset)
echo -n "${ZSH_THEME_RUBY_PROMPT_PREFIX}"
[[ -n "$gemset" ]] && echo -n "${ruby}@${gemset}" || echo -n "${ruby}"
echo "${ZSH_THEME_RUBY_PROMPT_SUFFIX}"
if [[ -n $(current_gemset) ]] ; then
echo "$(current_ruby)@$(current_gemset)"
else
echo "$(current_ruby)"
fi
}
else
alias rubies="ruby -v"
@ -58,11 +59,7 @@ else
function current_ruby() { echo "not supported" }
function current_gemset() { echo "not supported" }
function gems() { echo "not supported" }
function rbenv_prompt_info() {
echo -n "${ZSH_THEME_RUBY_PROMPT_PREFIX}"
echo -n "system: $(ruby -v | cut -f-2 -d ' ')"
echo "${ZSH_THEME_RUBY_PROMPT_SUFFIX}"
}
function rbenv_prompt_info() { echo "system: $(ruby -v | cut -f-2 -d ' ')" }
fi
unset FOUND_RBENV rbenvdirs dir