summaryrefslogtreecommitdiffstats
path: root/contrib/zsh-completion
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-12-28 02:38:58 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2012-12-28 02:38:58 +0100
commit4e457e0efd0e5fd5df24c7e9ed63b02d0196ea8d (patch)
tree09580c92ca78e8b9b54d7ed8d6b79d7fcd6fd9ff /contrib/zsh-completion
parent6737a37e5666837a8f51a2f74bdebdd756151394 (diff)
downloadnetctl-4e457e0efd0e5fd5df24c7e9ed63b02d0196ea8d.tar.gz
netctl-4e457e0efd0e5fd5df24c7e9ed63b02d0196ea8d.tar.xz
Forking netcfg to netctl (1/2)
This commit contains the moving of files.
Diffstat (limited to 'contrib/zsh-completion')
-rw-r--r--contrib/zsh-completion52
1 files changed, 0 insertions, 52 deletions
diff --git a/contrib/zsh-completion b/contrib/zsh-completion
deleted file mode 100644
index e05e183..0000000
--- a/contrib/zsh-completion
+++ /dev/null
@@ -1,52 +0,0 @@
-#compdef netcfg
-local -a disp
-
-all_options() {
- local _subcommands
- _subcommands=('list:List all available profiles'
- 'current:Report currently running profiles'
- 'check-iface:Start the specified profile, only if its interface is not currently up'
- 'up:Start the specified profile'
- 'reconnect:Disconnect and reconnect the specified profile'
- 'iface-recon:Reconnect profile active on specified interface'
- 'down:Stop the specified profile'
- 'iface-down:Stop the profile up on the specified interface'
- 'all-down:Stop all connected profiles'
- 'all-suspend:Suspend and store the name of all active profiles'
- 'all-resume:Reconnect any profiles that have been suspended')
-
- _path_files -W "/etc/network.d" -g "*(.)"
- _describe 'subcommand' _subcommands
-}
-
-all_profiles() {
- _path_files -W "/etc/network.d" -g "*(.)"
-}
-
-up_profiles() {
- _files -W "/run/network/profiles"
-}
-
-up_ifaces() {
- _files -W "/run/network/interfaces"
-}
-
-_arguments -C \
-'(- *)-l[List all available profiles]' \
-'(- *)-c[Start the specified profile, only if its interface is not currently up]:Network profile:all_profiles' \
-'(- *)-u[Start specified profile]:Network profile:all_profiles' \
-'(- *)-r[Disconnect and reconnect the specified profile]:Active profiles:up_profiles' \
-'(- *)-R[Reconnect profile active on specified interface]:Active interface:up_ifaces' \
-'(- *)-d[Take specified profile down]:Active profile:up_profiles' \
-'(- *)-D[Take down profile active on specified interface]:Active interface:up_ifaces' \
-'(- *)-a[Take all active profiles down]' \
-'(- *)*:All options:all_options'
-
-if [[ ${#words} == 3 ]]; then
- case $words[2] in
- 'check-iface' | 'up') all_profiles;;
- 'reconnect' | 'down') up_profiles;;
- 'iface-recon' | 'iface-down') up_ifaces;;
- esac
-fi
-