mirror of
https://github.com/abraunegg/onedrive
synced 2024-04-28 12:12:51 +02:00
7cf2912d2d
* Move lots of stuff into contrib directory to clean up root folder * Update autoconf files for new location of some files * Refactor README split and move to docs directory * Update INSTALL.md * Update Makefile.in * Install docs from new location * Uninstall docs correctly * Update Dockerfile * Fix up Dockerfile spacing * Move systemd stuff to contrib * Move docker specific stuff to contrib/docker, update docs * Fix Alpine and Stretch docker files * Update configure after changed file locations * Update INSTALL.md to include pkg-config as requirement * Move also entrypoint.sh to contrib/docker * Update 'min-notif-changes' to 'min-notify-changes' which was missed in PR #467 * Update to add --sync-root-files to usage.md and man page * Update usage.md to include --auth-files ARG details
43 lines
1.4 KiB
Bash
43 lines
1.4 KiB
Bash
#!/bin/bash
|
|
#
|
|
# BASH completion code for OneDrive Linux Client
|
|
# (c) 2019 Norbert Preining
|
|
# License: GPLv3+ (as with the rest of the OneDrive Linux client project)
|
|
|
|
_onedrive()
|
|
{
|
|
local cur prev
|
|
|
|
COMPREPLY=()
|
|
cur=${COMP_WORDS[COMP_CWORD]}
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
options='--check-for-nomount --check-for-nosync --debug-https --disable-notifications --display-config --display-sync-status -d --download-only --disable-upload-validation --dry-run --enable-logging --force-http-1.1 --local-first --logout -m --monitor --no-remote-delete --print-token --resync --skip-dot-files --skip-symlinks --synchronize --upload-only -v --verbose --version -h --help'
|
|
argopts='--create-directory --get-O365-drive-id --remove-directory --single-directory --source-directory'
|
|
|
|
# Loop on the arguments to manage conflicting options
|
|
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
|
#exclude some mutually exclusive options
|
|
[[ ${COMP_WORDS[i]} == '--synchronize' ]] && options=${options/--monitor}
|
|
[[ ${COMP_WORDS[i]} == '--monitor' ]] && options=${options/--synchronize}
|
|
done
|
|
|
|
case "$prev" in
|
|
--confdir|--syncdir)
|
|
_filedir
|
|
return 0
|
|
;;
|
|
--create-directory|--get-O365-drive-id|--remove-directory|--single-directory|--source-directory)
|
|
return 0
|
|
;;
|
|
*)
|
|
COMPREPLY=( $( compgen -W "$options $argopts" -- $cur))
|
|
return 0
|
|
;;
|
|
esac
|
|
|
|
# notreached
|
|
return 0
|
|
}
|
|
complete -F _onedrive onedrive
|