Skip to content

Commit f5ffa52

Browse files
committed
pushpkg: add fish completion
1 parent a372644 commit f5ffa52

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pushpkg/completions/pushpkg.fish

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function __pushpkg_complete_username
2+
echo "$PUSHPKG_USERNAME" && whoami
3+
end
4+
5+
function __pushpkg_complete_branch
6+
string replace "OUTPUT-" "" (basename "$PWD")
7+
end
8+
9+
complete -c pushpkg -s h -l help -d 'Print help information'
10+
complete -c pushpkg -s f -l force-push-noarch-package -d 'Force Push noarch package'
11+
complete -c pushpkg -s d -l delete -d 'Clean OUTPUT directory after finishing uploading'
12+
complete -c pushpkg -s r -l retro -d 'Push to AOSC OS/Retro repo'
13+
complete -c pushpkg -s v -l verbose -d 'Enable verbose logging for ssh and rsync'
14+
complete -xc pushpkg -n "__fish_is_nth_token 1" -a "(__pushpkg_complete_username)" -d 'Your LDAP username'
15+
complete -xc pushpkg -n "__fish_is_nth_token 2" -a "(__pushpkg_complete_branch)" -d 'AOSC OS update branch'
16+
complete -xc pushpkg -n "__fish_is_nth_token 3" -a "main bsp-sunxi bsp-rk bsp-rpi bsp-qcom" -d 'Repository component'

0 commit comments

Comments
 (0)