File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 66
77 - Improve tab-completion support for users of the lazy-loading
88 mode. (:bbuser: `upsuper `)
9+ - Add ``--help `` option to ``mkproject ``.
10+ - Add ``--help `` option to ``workon ``.
911
10123.6.1
1113
Original file line number Diff line number Diff line change @@ -619,11 +619,51 @@ function showvirtualenv {
619619 echo
620620}
621621
622+ # Show help for workon
623+ function workon_help {
624+ echo " Usage: workon env_name"
625+ echo " "
626+ echo " Deactivate any currently activated virtualenv"
627+ echo " and activate the named environment, triggering"
628+ echo " any hooks in the process."
629+ echo " "
630+ echo " workon"
631+ echo " "
632+ echo " Print a list of available environments."
633+ echo " (See also lsvirtualenv -b)"
634+ echo " "
635+ echo " workon (-h|--help)"
636+ echo " "
637+ echo " Show this help message."
638+ echo " "
639+ }
640+
622641# List or change working virtual environments
623642#
624643# Usage: workon [environment_name]
625644#
626645function workon {
646+ in_args=( " $@ " )
647+
648+ if [ -n " $ZSH_VERSION " ]
649+ then
650+ i=1
651+ tst=" -le"
652+ else
653+ i=0
654+ tst=" -lt"
655+ fi
656+ while [ $i $tst $# ]
657+ do
658+ a=" ${in_args[$i]} "
659+ case " $a " in
660+ -h|--help)
661+ workon_help;
662+ return 0;;
663+ esac
664+ i=$(( $i + 1 ))
665+ done
666+
627667 typeset env_name=" $1 "
628668 if [ " $env_name " = " " ]
629669 then
You can’t perform that action at this time.
0 commit comments