* [gentoo-commits] proj/R_overlay:master commit in: files/misc/
@ 2013-08-09 10:18 André Erdmann
0 siblings, 0 replies; 7+ messages in thread
From: André Erdmann @ 2013-08-09 10:18 UTC (permalink / raw
To: gentoo-commits
commit: e65b3e5e4dba9e1895fa48ad1acfa4098341ca24
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Fri Aug 9 10:14:58 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Fri Aug 9 10:14:58 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=e65b3e5e
files/misc: bash completion for roverlay
---
files/misc/roverlay.bashcomp | 116 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 116 insertions(+)
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp
new file mode 100644
index 0000000..2f18ee9
--- /dev/null
+++ b/files/misc/roverlay.bashcomp
@@ -0,0 +1,116 @@
+# R overlay -- bash completion for roverlay
+# -*- coding: utf-8 -*-
+
+_roverlay_comp() {
+ local cur
+ local prev
+
+ COMPREPLY=()
+ _get_comp_words_by_ref cur prev
+
+ local LONGOPTS=(
+ '--help' '--version'
+ '--config' '--field-definition' '--fdef' '--repo-config'
+ '--deprule-file' '--package-rules' '--overlay' '--overlay-name'
+ '--additions-dir'
+ '--write-overlay' '--write' '--no-write-overlay' '--no-write'
+ '--show-overlay' '--show' '--no-show-overlay' '--no-show'
+ '--strict-sync' '--sync' '--nosync' '--no-sync' '--sync-imports'
+ '--distroot' '--force-distroot' '--local-distdir' '--from'
+ '--incremental' '--no-incremental' '--fixup-category-move'
+ '--fixup-category-move-reverse' '--distmap-verify' '--revbump'
+ '--no-revbump' '--immediate-ebuild-writes' '--manifest' '--no-manifest'
+ '--manifest-implementation' '--target-uid' '--target-gid' '--pc'
+ '--print-config' '--ppr' '--print-package-rules'
+ '--help-config' '--list-config-entries' '--dump-file' '--strict'
+ '--stats' '--no-stats' '--dump-stats'
+ )
+
+ local SHORTOPTS=(
+ '-h' '-V' '-c' '-F' '-R' '-D' '-P' '-O' '-N' '-A' '-M'
+ )
+
+ local CMDARGS=(
+ 'sync' 'create' 'depres' 'depres_console' 'nop' 'apply_rules'
+ 'setupdirs'
+ )
+
+ local have_command=
+ local k
+ local first=y
+ for k in "${COMP_WORDS[@]}"; do
+ if [[ " ${CMDARGS[*]} " == *" ${k} "* ]] && [[ -z "${first}" ]]; then
+ have_command=y
+ break
+ fi
+ first=
+ done
+
+ case "${prev}" in
+ '-c'|'--config'|'-F'|'--field-definition'|'--fdef'|\
+ '-R'|'--repo-config')
+ # options with <file> arg
+ _filedir
+ ;;
+
+ '-O'|'--overlay'|'-A'|'--additions-dir'|'--distroot'|\
+ '--local-distdir'|'--from')
+ # options with <dir> arg
+ _filedir -d
+ ;;
+
+ '-D'|'--deprule-file'|'-P'|'--package-rules')
+ # options with <file|dir> arg
+ _filedir
+ ;;
+
+ '--dump-file')
+ # stdout or file
+ _filedir
+ [[ "${cur}" ]] || COMPREPLY+=( "-" )
+ ;;
+
+ '-M'|'--manifest-implementation')
+ COMPREPLY=( $(compgen -W "default next ebuild e" -- "${cur}" ) )
+ ;;
+
+ '--target-uid')
+ COMPREPLY=( $( compgen -u -- "${cur}" ) )
+ #_uids
+ #COMPREPLY+=
+ ;;
+
+ '--target-gid')
+ COMPREPLY=( $( compgen -g -- "${cur}" ) )
+ #_gids
+ #COMPREPLY+=
+ ;;
+
+
+ '-N'|'--overlay-name')
+ # options with str/unspecified arg
+ true
+ ;;
+
+ *)
+ case "${cur}" in
+ --*)
+ COMPREPLY=( $( compgen -W "${LONGOPTS[*]}" -- "${cur}" ) )
+ ;;
+ -*)
+ COMPREPLY=(
+ $( compgen -W "${LONGOPTS[*]} ${SHORTOPTS[*]}" -- "${cur}" )
+ )
+ ;;
+ *)
+ local words="${LONGOPTS[*]} ${SHORTOPTS[*]}"
+ [[ "${have_command}" ]] || words+=" ${CMDARGS[*]}"
+ COMPREPLY=( $( compgen -W "${words}" -- "${cur}" ) )
+ ;;
+ esac
+
+ ;;
+ esac
+}
+
+complete -F _roverlay_comp roverlay
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: files/misc/
@ 2013-08-19 15:42 André Erdmann
0 siblings, 0 replies; 7+ messages in thread
From: André Erdmann @ 2013-08-19 15:42 UTC (permalink / raw
To: gentoo-commits
commit: d8b0e48d177a47878eeacb88f7d436d814188766
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Aug 19 15:20:10 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Aug 19 15:20:10 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=d8b0e48d
add bash completion for roverlay-status
---
files/misc/roverlay.bashcomp | 99 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 98 insertions(+), 1 deletion(-)
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp
index 4e6170b..49db8b4 100644
--- a/files/misc/roverlay.bashcomp
+++ b/files/misc/roverlay.bashcomp
@@ -112,5 +112,102 @@ _roverlay_comp() {
;;
esac
}
-
complete -F _roverlay_comp roverlay
+
+_roverlay_status_comp() {
+ local cur
+ local prev
+
+ COMPREPLY=()
+ _get_comp_words_by_ref cur prev
+
+ local MODE_LONGOPTS=( '--mode' '--cli' '--html' '--cgi' )
+ local LONGOPTS=(
+ '--help' '--version'
+ '--config'
+ '--output' '--template' '--cgi-content-type' '--module-root'
+ )
+
+ local MODE_SHORTOPTS=( '-m' )
+ local SHORTOPTS=(
+ '-h' '-V' '-c' '-O' '-t' '-T' '-M'
+ )
+
+ local CMDARGS=( 'status' )
+
+ local have_mode=
+ local have_command=
+ local k
+ local first=y
+ for k in "${COMP_WORDS[@]}"; do
+ if [[ -z "${first}" ]]; then
+ case "${k}" in
+ '--cgi'|'--cli'|'--html'|'--mode'|'-m')
+ have_mode=y
+ ;;
+ *)
+ if [[ " ${CMDARGS[*]} " == *" ${k} "* ]]; then
+ have_command=y
+ fi
+ ;;
+ esac
+
+ if [[ ( "${have_mode}" ) && ( "${have_command}" ) ]]; then
+ break
+ fi
+ else
+ first=n
+ fi
+ done
+
+ if [[ "${have_mode}" ]]; then
+ LONGOPTS+=( "${MODE_LONGOPTS[@]}" )
+ SHORTOPTS+=( "${MODE_SHORTOPTS[@]}" )
+ fi
+
+ case "${prev}" in
+ '-c'|'--config'|'-O'|'--output')
+ # options with <file> arg
+ _filedir
+ ;;
+
+ '-t'|'--template')
+ # --template accepts names and files
+ _filedir
+ ;;
+
+ '-M'|'--module-root')
+ # options with <dir> arg
+ _filedir -d
+ ;;
+
+ '-m'|'--mode')
+ COMPREPLY=( $(compgen -W "cli html cgi" -- "${cur}" ) )
+ ;;
+
+ '-T'|'--cgi-content-type')
+ # accepts any word, but text/plain, text/html are common choices
+ COMPREPLY=( $(compgen -W "text/plain text/html" -- "${cur}" ) )
+ ;;
+
+ *)
+ case "${cur}" in
+ --*)
+ COMPREPLY=( $( compgen -W "${LONGOPTS[*]}" -- "${cur}" ) )
+ ;;
+ -*)
+ COMPREPLY=(
+ $( compgen -W "${LONGOPTS[*]} ${SHORTOPTS[*]}" -- "${cur}" )
+ )
+ ;;
+ *)
+ local words="${LONGOPTS[*]} ${SHORTOPTS[*]}"
+ [[ "${have_command}" ]] || words+=" ${CMDARGS[*]}"
+ COMPREPLY=( $( compgen -W "${words}" -- "${cur}" ) )
+ ;;
+ esac
+
+ ;;
+ esac
+}
+complete -F _roverlay_status_comp roverlay-status
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: files/misc/
@ 2013-09-13 16:19 André Erdmann
0 siblings, 0 replies; 7+ messages in thread
From: André Erdmann @ 2013-09-13 16:19 UTC (permalink / raw
To: gentoo-commits
commit: fb8237ed458933cf0ce2ed52d2e2abceebe9193e
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Fri Sep 13 16:13:19 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Fri Sep 13 16:13:19 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=fb8237ed
roverlay.bashcomp: roverlay-setup
---
files/misc/roverlay.bashcomp | 123 +++++++++++++++++++++++++++++++++++++------
1 file changed, 106 insertions(+), 17 deletions(-)
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp
index 6f06508..63bc177 100644
--- a/files/misc/roverlay.bashcomp
+++ b/files/misc/roverlay.bashcomp
@@ -20,8 +20,8 @@ _roverlay_comp() {
'--incremental' '--no-incremental' '--fixup-category-move'
'--fixup-category-move-reverse' '--distmap-verify' '--revbump'
'--no-revbump' '--immediate-ebuild-writes' '--manifest' '--no-manifest'
- '--manifest-implementation' '--target-uid' '--target-gid' '--pc'
- '--print-config' '--ppr' '--print-package-rules'
+ '--manifest-implementation' '--pc' '--print-config'
+ '--ppr' '--print-package-rules'
'--help-config' '--list-config-entries' '--dump-file' '--strict'
'--stats' '--no-stats' '--dump-stats'
)
@@ -74,19 +74,6 @@ _roverlay_comp() {
COMPREPLY=( $(compgen -W "default next ebuild e" -- "${cur}" ) )
;;
- '--target-uid')
- COMPREPLY=( $( compgen -u -- "${cur}" ) )
- #_uids
- #COMPREPLY+=
- ;;
-
- '--target-gid')
- COMPREPLY=( $( compgen -g -- "${cur}" ) )
- #_gids
- #COMPREPLY+=
- ;;
-
-
'-N'|'--overlay-name')
# options with str/unspecified arg
true
@@ -156,11 +143,11 @@ _roverlay_status_comp() {
break
fi
else
- first=n
+ first=
fi
done
- if [[ "${have_mode}" ]]; then
+ if [[ -z "${have_mode}" ]]; then
LONGOPTS+=( "${MODE_LONGOPTS[@]}" )
SHORTOPTS+=( "${MODE_SHORTOPTS[@]}" )
fi
@@ -211,3 +198,105 @@ _roverlay_status_comp() {
esac
}
complete -F _roverlay_status_comp roverlay-status
+
+_roverlay_setup_comp() {
+ local cur
+ local prev
+
+ COMPREPLY=()
+ _get_comp_words_by_ref cur prev
+
+ local LONGOPTS=(
+ '--help' '--usage' '--version'
+ '--work-root' '--data-root' '--conf-root' '--conf-dir' '--my-conf-root'
+ '--output' '--ask' '--expand-user' '--additions-dir' '--variable'
+ '--prjroot-relpath' '--enable-default-hooks' '--no-default-hooks'
+ '--import-config' '--no-import-config' '--target-uid' '--target-gid'
+ '--overwrite-hooks' '--relpath-hooks' '--no-relpath-hooks'
+ )
+ local SHORTOPTS=(
+ '-h' '-V' '-W' '-D' '-C' '-O' '-a' '-A' '-v' '-I'
+ )
+
+ local CMDARGS=( 'init' 'hooks' 'mkconfig' )
+
+ local CONFIG_IMPORT_MODES=(
+ 'disable' 'symlink' 'symlink=root' 'symlink=dirs' 'symlink=files copy'
+ )
+ local HOOK_OVERWRITE=( 'none' 'dead' 'links' 'all' )
+
+ local have_command
+ local k
+ local first=y
+ for k in "${COMP_WORDS[@]}"; do
+ if [[ " ${CMDARGS[*]} " == *" ${k} "* ]] && [[ -z "${first}" ]]; then
+ have_command="${k}"
+ case "${k}" in
+ 'init'|'hooks')
+ LONGOPTS+=( '--pretend' )
+ SHORTOPTS+=( '-p' )
+ ;;
+ esac
+ break
+ else
+ first=
+ fi
+ done
+
+ case "${prev}" in
+ '-v'|'--variable')
+ :
+ ;;
+
+ '-W'|'--work-root'|'-D'|'--data-root'|'--conf-root'|\
+ '-C'|'--conf-dir'|'--my-conf-root'|'-A'|'--additions-dir')
+ # options with <dir> arg
+ _filedir -d
+ ;;
+
+ '-O'|'--output')
+ # <dir>|<file>|-
+ _filedir
+ [[ "${cur}" ]] || COMPREPLY+=( "-" )
+ ;;
+
+ '-I'|'--import-config')
+ COMPREPLY=( $(compgen -W "${CONFIG_IMPORT_MODES[*]}" -- "${cur}" ) )
+ ;;
+
+ '--overwrite-hooks')
+ COMPREPLY=( $(compgen -W "${HOOK_OVERWRITE[*]}" -- "${cur}" ) )
+ ;;
+
+ '--target-uid')
+ COMPREPLY=( $( compgen -u -- "${cur}" ) )
+ #_uids
+ #COMPREPLY+=
+ ;;
+
+ '--target-gid')
+ COMPREPLY=( $( compgen -g -- "${cur}" ) )
+ #_gids
+ #COMPREPLY+=
+ ;;
+
+ *)
+ case "${cur}" in
+ --*)
+ COMPREPLY=( $( compgen -W "${LONGOPTS[*]}" -- "${cur}" ) )
+ ;;
+ -*)
+ COMPREPLY=(
+ $( compgen -W "${LONGOPTS[*]} ${SHORTOPTS[*]}" -- "${cur}" )
+ )
+ ;;
+ *)
+ local words="${LONGOPTS[*]} ${SHORTOPTS[*]}"
+ [[ "${have_command}" ]] || words+=" ${CMDARGS[*]}"
+ COMPREPLY=( $( compgen -W "${words}" -- "${cur}" ) )
+ ;;
+ esac
+ ;;
+ esac
+}
+complete -F _roverlay_setup_comp roverlay-setup
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: files/misc/
@ 2013-09-23 15:30 André Erdmann
0 siblings, 0 replies; 7+ messages in thread
From: André Erdmann @ 2013-09-23 15:30 UTC (permalink / raw
To: gentoo-commits
commit: baa36ff62669602023eb14d8550b648133b77d39
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Sep 23 15:13:29 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Sep 23 15:13:29 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=baa36ff6
roverlay.bashcomp, roverlay-setup: subcommands
do not continue with normal command completion if a subcommand was provided.
---
files/misc/roverlay.bashcomp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp
index a4b2871..60a49e6 100644
--- a/files/misc/roverlay.bashcomp
+++ b/files/misc/roverlay.bashcomp
@@ -244,6 +244,11 @@ _roverlay_setup_comp() {
fi
done
+ # bashcomp for subcommands is missing:
+ # * init, mkconfig do not have any special options
+ # * hooks has "show|add|del <hook> <event>..."
+ [[ -z "${have_command-}" ]] || return 0
+
case "${prev}" in
'-v'|'--variable')
:
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: files/misc/
@ 2014-02-22 15:15 André Erdmann
0 siblings, 0 replies; 7+ messages in thread
From: André Erdmann @ 2014-02-22 15:15 UTC (permalink / raw
To: gentoo-commits
commit: 6e4f6bda0b41e9b4cf554c6d06db0ad3cb85ba12
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Sat Feb 22 15:15:25 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Sat Feb 22 15:15:25 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=6e4f6bda
add bash completion for roverlay-query-config
---
files/misc/roverlay.bashcomp | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp
index 60a49e6..c15dd96 100644
--- a/files/misc/roverlay.bashcomp
+++ b/files/misc/roverlay.bashcomp
@@ -306,3 +306,35 @@ _roverlay_setup_comp() {
esac
}
complete -F _roverlay_setup_comp roverlay-setup
+
+_roverlay_query_config_comp() {
+ local cur
+ local prev
+
+ COMPREPLY=()
+ _get_comp_words_by_ref cur prev
+
+ local LONGOPTS=(
+ '--help' '--config-file' '--all' '--list-all'
+ '--empty-missing' '--from-file' '--outfile' '--variable'
+ )
+ local SHORTOPTS=(
+ '-h' '-C' '-a' '-l' '-u' '-f' '-O' '-v'
+ )
+
+ case "${prev}" in
+ '-C'|'--config-file'|'-f'|'--from-file'|'-O'|'--outfile')
+ # <file> arg
+ _filedir
+ ;;
+ '-v'|'--variable')
+ true
+ ;;
+ *)
+ COMPREPLY=(
+ $( compgen -W "${LONGOPTS[*]} ${SHORTOPTS[*]}" -- "${cur}" )
+ )
+ ;;
+ esac
+}
+complete -F _roverlay_query_config_comp roverlay-query-config
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: files/misc/
@ 2014-04-01 16:38 André Erdmann
0 siblings, 0 replies; 7+ messages in thread
From: André Erdmann @ 2014-04-01 16:38 UTC (permalink / raw
To: gentoo-commits
commit: 93cbdb3bbb3615dd03f56dd28336912195433d38
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Tue Apr 1 16:29:56 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Tue Apr 1 16:36:36 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=93cbdb3b
update roverlay-setup bash completion
---
files/misc/roverlay.bashcomp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp
index e521c85..6d43522 100644
--- a/files/misc/roverlay.bashcomp
+++ b/files/misc/roverlay.bashcomp
@@ -216,6 +216,7 @@ _roverlay_setup_comp() {
local LONGOPTS=(
'--help' '--usage' '--version'
'--work-root' '--data-root' '--conf-root' '--conf-dir' '--my-conf-root'
+ '--target-type' '--foreign' '--not-gentoo'
'--output' '--ask' '--expand-user' '--additions-dir' '--variable'
'--prjroot-relpath' '--enable-default-hooks' '--no-default-hooks'
'--import-config' '--no-import-config' '--force-import-config'
@@ -293,6 +294,10 @@ _roverlay_setup_comp() {
#COMPREPLY+=
;;
+ '--target-type')
+ COMPREPLY=( $( compgen -W "gentoo foreign" -- "${cur}" ) )
+ ;;
+
*)
case "${cur}" in
--*)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: files/misc/
@ 2014-07-18 16:20 André Erdmann
0 siblings, 0 replies; 7+ messages in thread
From: André Erdmann @ 2014-07-18 16:20 UTC (permalink / raw
To: gentoo-commits
commit: d7387f446ac12d5a3b50f424b1f3d9be4a65e7ae
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Fri Jul 18 14:34:44 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Fri Jul 18 14:34:44 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=d7387f44
files/misc/roverlay.bashcomp: add-policy args
---
files/misc/roverlay.bashcomp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/files/misc/roverlay.bashcomp b/files/misc/roverlay.bashcomp
index d9bfdf2..90ce3e9 100644
--- a/files/misc/roverlay.bashcomp
+++ b/files/misc/roverlay.bashcomp
@@ -25,6 +25,8 @@ _roverlay_comp() {
'--help-config' '--list-config-entries' '--dump-file' '--strict'
'--stats' '--no-stats' '--dump-stats'
'--log-level' '--verbose'
+ '--package-revbump' '--package-replace' '--package-replace-only'
+ '--package-list' '--ebuild-list'
)
local SHORTOPTS=(
@@ -49,7 +51,7 @@ _roverlay_comp() {
case "${prev}" in
'-c'|'--config'|'-F'|'--field-definition'|'--fdef'|\
- '-R'|'--repo-config')
+ '-R'|'--repo-config'|'--package-list'|'--ebuild-list')
# options with <file> arg
_filedir
;;
@@ -75,7 +77,7 @@ _roverlay_comp() {
COMPREPLY=( $(compgen -W "default next ebuild e" -- "${cur}" ) )
;;
- '-N'|'--overlay-name')
+ '-N'|'--overlay-name'|'--package-'*)
# options with str/unspecified arg
true
;;
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-18 16:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 15:30 [gentoo-commits] proj/R_overlay:master commit in: files/misc/ André Erdmann
-- strict thread matches above, loose matches on Subject: below --
2014-07-18 16:20 André Erdmann
2014-04-01 16:38 André Erdmann
2014-02-22 15:15 André Erdmann
2013-09-13 16:19 André Erdmann
2013-08-19 15:42 André Erdmann
2013-08-09 10:18 André Erdmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox