mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Added the ability to browse GitHub files.
This commit is contained in:
parent
304530d990
commit
1a3940b9a3
2 changed files with 10 additions and 4 deletions
|
|
@ -8,11 +8,12 @@
|
|||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
local state remotes remote branches ret=1
|
||||
local state remotes remote branches files ret=1
|
||||
|
||||
_arguments -C -s -S \
|
||||
'1::args:->remote' \
|
||||
'2::args:->branch' && ret=0
|
||||
'2::args:->branch' \
|
||||
'3::args:->file' && ret=0
|
||||
|
||||
case "$state" in
|
||||
(remote)
|
||||
|
|
@ -33,6 +34,10 @@ case "$state" in
|
|||
))
|
||||
_describe -t branch 'branches' branches && ret=0
|
||||
;;
|
||||
(file)
|
||||
files=(${(0)"$(_call_program files git ls-files -z --exclude-standard 2>/dev/null)"})
|
||||
_wanted file expl 'file' _multi_parts - / files && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue