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 6
6
7
7
- Improve tab-completion support for users of the lazy-loading
8
8
mode. (:bbuser: `upsuper `)
9
+ - Add ``--help `` option to ``mkproject ``.
10
+ - Add ``--help `` option to ``workon ``.
9
11
10
12
3.6.1
11
13
Original file line number Diff line number Diff line change @@ -619,11 +619,51 @@ function showvirtualenv {
619
619
echo
620
620
}
621
621
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
+
622
641
# List or change working virtual environments
623
642
#
624
643
# Usage: workon [environment_name]
625
644
#
626
645
function 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
+
627
667
typeset env_name=" $1 "
628
668
if [ " $env_name " = " " ]
629
669
then
You can’t perform that action at this time.
0 commit comments