fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerMerge pull request #117158219dd8af

master
8.1 KiB115 linesraw
1set -l commands assemble create rm enter list ls stop upgrade ephemeral generate-entry version help
2
3complete -c distrobox -f
4
5function __fish_distrobox_list_containers
6    distrobox ls | tr -d ' ' | cut -d "|" -f2 | tail -n +2
7end
8
9complete -c distrobox \
10    -s V -l version -d "Show version"
11complete -c distrobox -n "__fish_seen_subcommand_from $commands" \
12    -s v -l verbose -d "Show more verbosity"
13complete -c distrobox -n "__fish_seen_subcommand_from $commands" \
14    -s h -l help -d "Show help message"
15complete -c distrobox -n "__fish_seen_subcommand_from enter ephemeral list ls create rm generate-entry upgrade && not __fish_seen_subcommand_from assemble" \
16    -s r -l root -d "Launch podman/docker/lilipod with root privileges"
17
18complete -c distrobox -n "not __fish_seen_subcommand_from $commands" \
19    -a "$commands"
20
21complete -c distrobox -n "__fish_seen_subcommand_from assemble" \
22    -a "create rm"
23complete -c distrobox -n "__fish_seen_subcommand_from assemble && __fish_seen_subcommand_from create rm" \
24    -l file -F -d "Path or URL to the distrobox manifest/ini file"
25complete -c distrobox -n "__fish_seen_subcommand_from assemble && __fish_seen_subcommand_from create rm" \
26    -s n -l name -d "Run against a single entry in the manifest/ini file"
27complete -c distrobox -n "__fish_seen_subcommand_from assemble && __fish_seen_subcommand_from create rm" \
28    -s r -l replace -d "Replace already existing distroboxes with matching names"
29complete -c distrobox -n "__fish_seen_subcommand_from assemble && __fish_seen_subcommand_from create rm" \
30    -s d -l dry-run -d "Only print the container manager command generated"
31
32complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
33    -s i -l image -ra "(distrobox create -C)"
34complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
35    -s n -l name -d "Image to use for the container"
36complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
37    -l hostname -d "Hostname for the distrobox"
38complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
39    -s p -l pull -d "Pull the image even if it exists locally (implies --yes)"
40complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral stop && not __fish_seen_subcommand_from assemble" \
41    -s Y -l yes -d "non-interactive, pull images without asking"
42complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
43    -s c -l clone -ra "(__fish_distrobox_list_containers)" -d "Name of the distrobox container to use as base for a new container"
44complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
45    -s H -l home -d "Select a custom HOME directory for the container"
46complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
47    -l volume -d "Additional volumes to add to the container"
48complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
49    -s a -l additional-flags -d "Additional flags to pass to the container manager command"
50complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
51    -s ap -l additional-packages -d "Additional packages to install during initial container setup"
52complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
53    -l init-hooks -d "Additional commands to execute at the end of container initialization"
54complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
55    -l pre-init-hooks -d "Additional commands to execute at the start of container initialization"
56complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
57    -s I -l init -d "Use init system (like systemd) inside the container."
58complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
59    -l nvidia -d "Try to integrate host's nVidia drivers in the guest"
60complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
61    -l platform -d "Specify which platform to use, eg: linux/arm64"
62complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
63    -l unshare-devsys -d "Do not share host devices and sysfs dirs from host"
64complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
65    -l unshare-groups -d "Do not forward user's additional groups into the container"
66complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
67    -l unshare-ipc -d "Do not share ipc namespace with host"
68complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
69    -l unshare-netns -d "Do not share the net namespace with host"
70complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
71    -l unshare-process -d "Do not share process namespace with host"
72complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
73    -l unshare-all -d "Activate all the unshare flags"
74complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
75    -s C -l compatibility -d "Show list of compatible images"
76complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
77    -l no-entry -d "Do not generate a container entry in the application list"
78complete -c distrobox -n "__fish_seen_subcommand_from create ephemeral && not __fish_seen_subcommand_from assemble" \
79    -l absolutely-disable-root-password-i-am-really-positively-sure -d "When setting up a rootful distrobox, this will skip user password setup, leaving it blank"
80
81complete -c distrobox -n "__fish_seen_subcommand_from enter rm stop upgrade" \
82    -ra "(__fish_distrobox_list_containers)"
83complete -c distrobox -n "__fish_seen_subcommand_from enter" \
84    -s n -l name -ra "(__fish_distrobox_list_containers)" -d "Name for the distrobox"
85complete -c distrobox -n "__fish_seen_subcommand_from enter ephemeral" \
86    -s "e -" -d "End arguments, execute the rest as command to execute at login"
87complete -c distrobox -n "__fish_seen_subcommand_from enter" \
88    -l clean-path -d "Reset PATH inside container to FHS standard"
89complete -c distrobox -n "__fish_seen_subcommand_from enter" \
90    -s T -l no-tty -d "Do not instantiate a tty"
91complete -c distrobox -n "__fish_seen_subcommand_from enter" \
92    -s nw -l no-workdir -d "Always start the container from container's home directory"
93complete -c distrobox -n "__fish_seen_subcommand_from enter" \
94    -s a -l additional-flags -d "Additional flags to pass to the container manager command"
95
96complete -c distrobox -n "__fish_seen_subcommand_from enter" \
97    -s d -l dry-run -d "Only print the container manager command generated"
98
99complete -c distrobox -n "__fish_seen_subcommand_from list ls" \
100    -l no-color -d "Disable color formatting"
101
102complete -c distrobox -n "__fish_seen_subcommand_from rm stop upgrade generate-entry" \
103    -s a -l all -d "Delete all distroboxes"
104complete -c distrobox -n "__fish_seen_subcommand_from rm" \
105    -s f -l force -d "Force deletion"
106complete -c distrobox -n "__fish_seen_subcommand_from rm" \
107    -l rm-home -d "Remove the mounted home if it differs from the host user's one"
108
109complete -c distrobox -n "__fish_seen_subcommand_from upgrade" \
110    -l running -d "Perform only for running distroboxes"
111
112complete -c distrobox -n "__fish_seen_subcommand_from generate-entry" \
113    -s d -l delete -d "Delete the entry"
114complete -c distrobox -n "__fish_seen_subcommand_from generate-entry" \
115    -s i -l icon -F -r -d "Specify a custom icon"