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 ## Aliases
| Alias | Command | | Alias | Command |
| ------- | ---------------------------------- | |---------|------------------------------------|
| ara | `arc amend` | | ara | `arc amend` |
| arb | `arc branch` | | arb | `arc branch` |
| arco | `arc cover` | | arco | `arc cover` |
| arci | `arc commit` | | arci | `arc commit` |
| ard | `arc diff` | | ard | `arc diff` |
| ardc | `arc diff --create` | | ardc | `arc diff --create` |
| ardp | `arc diff --preview` |
| ardnu | `arc diff --nounit` | | ardnu | `arc diff --nounit` |
| ardnupc | `arc diff --nounit --plan-changes` | | ardnupc | `arc diff --nounit --plan-changes` |
| ardpc | `arc diff --plan-changes` | | ardpc | `arc diff --plan-changes` |
@ -28,14 +27,3 @@ plugins=(... arcanist)
| arli | `arc lint` | | arli | `arc lint` |
| arls | `arc list` | | arls | `arc list` |
| arpa | `arc patch` | | 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 ardnu='arc diff --nounit'
alias ardnupc='arc diff --nounit --plan-changes' alias ardnupc='arc diff --nounit --plan-changes'
alias ardpc='arc diff --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 are='arc export'
alias arh='arc help' alias arh='arc help'
alias arl='arc land' alias arl='arc land'
alias arli='arc lint' alias arli='arc lint'
alias arls='arc list' alias arls='arc list'
alias arpa='arc patch'
#
# 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}"
}

View File

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

View File

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