zsh: Complete --dev, --dir etc. as directories

The argument is a directory inside the container, but it seems reasonable
to assume that directories that exist outside the container are likely
candidates for wanting to create inside the container.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2021-06-24 10:19:36 +01:00
parent c62a94639c
commit b11a2d0ebe

View File

@@ -15,9 +15,9 @@ _bwrap_args=(
'--chdir DIR[Change directory to DIR]: : _files -/'
'--dev-bind-try[Equal to --dev-bind but ignores non-existent SRC]:source:_files:destination:_files'
'--dev-bind[Bind mount the host path SRC on DEST, allowing device access]:source:_files:destination:_files'
'--dev[Mount new dev on DEST]: :'
'--dev[Mount new dev on DEST]:mount point for /dev:_files -/'
"--die-with-parent[Kills with SIGKILL child process (COMMAND) when bwrap or bwrap's parent dies.]"
'--dir[Create dir at DEST]: :'
'--dir[Create dir at DEST]:directory to create:_files -/'
'--exec-label[Exec label for the sandbox]: :'
'--file-label[File label for temporary sandbox content]: :'
'--file[Copy from FD to destination DEST]: :_guard "[0-9]#" "file descriptor to read content from":destination:_files'
@@ -27,10 +27,10 @@ _bwrap_args=(
'--info-fd[Write information about the running container to FD]: :_guard "[0-9]#" "file descriptor to write to"'
'--json-status-fd[Write container status to FD as multiple JSON documents]: :_guard "[0-9]#" "file descriptor to write to"'
'--lock-file[Take a lock on DEST while sandbox is running]: :'
'--mqueue[Mount new mqueue on DEST]: :'
'--mqueue[Mount new mqueue on DEST]:mount point for mqueue:_files -/'
'--new-session[Create a new terminal session]'
'--pidns[Use this user namespace (as parent namespace if using --unshare-pid)]: :'
'--proc[Mount new procfs on DEST]: :'
'--proc[Mount new procfs on DEST]:mount point for procfs:_files -/'
'--remount-ro[Remount DEST as readonly; does not recursively remount]: :'
'--ro-bind-data[Copy from FD to file which is readonly bind-mounted on DEST]: :_guard "[0-9]#" "file descriptor to read content from":destination:_files'
'--ro-bind-try[Equal to --ro-bind but ignores non-existent SRC]:source:_files:destination:_files'
@@ -39,7 +39,7 @@ _bwrap_args=(
'--setenv[Set an environment variable]: :'
'--symlink[Create symlink at DEST with target SRC]: : :'
'--sync-fd[Keep this fd open while sandbox is running]: :_guard "[0-9]#" "file descriptor to keep open"'
'--tmpfs[Mount new tmpfs on DEST]: :'
'--tmpfs[Mount new tmpfs on DEST]:mount point for tmpfs:_files -/'
'--uid[Custom uid in the sandbox (requires --unshare-user or --userns)]: :'
'--unsetenv[Unset an environment variable]: :'
'--unshare-all[Unshare every namespace we support by default]'