Skip to content

Commit 028957b

Browse files
committed
completed logic for animal saying
1 parent 6751d06 commit 028957b

File tree

1,040 files changed

+44
-193805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,040 files changed

+44
-193805
lines changed

implement-cowsay/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

implement-cowsay/.venv/bin/Activate.ps1

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ function global:deactivate ([switch]$NonDestructive) {
9696
Remove-Item -Path env:VIRTUAL_ENV
9797
}
9898

99-
# Just remove VIRTUAL_ENV_PROMPT altogether.
100-
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
101-
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
102-
}
103-
10499
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
105100
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
106101
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
@@ -202,7 +197,7 @@ else {
202197
$Prompt = $pyvenvCfg['prompt'];
203198
}
204199
else {
205-
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
200+
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virutal environment)"
206201
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
207202
$Prompt = Split-Path -Path $venvDir -Leaf
208203
}
@@ -233,7 +228,6 @@ if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
233228
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
234229
_OLD_VIRTUAL_PROMPT
235230
}
236-
$env:VIRTUAL_ENV_PROMPT = $Prompt
237231
}
238232

239233
# Clear PYTHONHOME
Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file must be used with "source bin/activate" *from bash*
2-
# You cannot run it directly
2+
# you cannot run it directly
33

44
deactivate () {
55
# reset old environment variables
@@ -14,9 +14,12 @@ deactivate () {
1414
unset _OLD_VIRTUAL_PYTHONHOME
1515
fi
1616

17-
# Call hash to forget past commands. Without forgetting
17+
# This should detect bash and zsh, which have a hash command that must
18+
# be called to get it to forget past commands. Without forgetting
1819
# past commands the $PATH changes we made may not be respected
19-
hash -r 2> /dev/null
20+
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
21+
hash -r 2> /dev/null
22+
fi
2023

2124
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
2225
PS1="${_OLD_VIRTUAL_PS1:-}"
@@ -25,7 +28,6 @@ deactivate () {
2528
fi
2629

2730
unset VIRTUAL_ENV
28-
unset VIRTUAL_ENV_PROMPT
2931
if [ ! "${1:-}" = "nondestructive" ] ; then
3032
# Self destruct!
3133
unset -f deactivate
@@ -35,18 +37,11 @@ deactivate () {
3537
# unset irrelevant variables
3638
deactivate nondestructive
3739

38-
# on Windows, a path can contain colons and backslashes and has to be converted:
39-
if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
40-
# transform D:\path\to\venv to /d/path/to/venv on MSYS
41-
# and to /cygdrive/d/path/to/venv on Cygwin
42-
export VIRTUAL_ENV=$(cygpath /home/tzemingho/GitHub/CYF/SDC/Module-Tools/implement-cowsay/.venv)
43-
else
44-
# use the path as-is
45-
export VIRTUAL_ENV=/home/tzemingho/GitHub/CYF/SDC/Module-Tools/implement-cowsay/.venv
46-
fi
40+
VIRTUAL_ENV="/Users/cyf/GitHub/SDC/Module-Tools/implement-cowsay/.venv"
41+
export VIRTUAL_ENV
4742

4843
_OLD_VIRTUAL_PATH="$PATH"
49-
PATH="$VIRTUAL_ENV/"bin":$PATH"
44+
PATH="$VIRTUAL_ENV/bin:$PATH"
5045
export PATH
5146

5247
# unset PYTHONHOME if set
@@ -59,12 +54,13 @@ fi
5954

6055
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
6156
_OLD_VIRTUAL_PS1="${PS1:-}"
62-
PS1='(.venv) '"${PS1:-}"
57+
PS1="(.venv) ${PS1:-}"
6358
export PS1
64-
VIRTUAL_ENV_PROMPT='(.venv) '
65-
export VIRTUAL_ENV_PROMPT
6659
fi
6760

68-
# Call hash to forget past commands. Without forgetting
61+
# This should detect bash and zsh, which have a hash command that must
62+
# be called to get it to forget past commands. Without forgetting
6963
# past commands the $PATH changes we made may not be respected
70-
hash -r 2> /dev/null
64+
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
65+
hash -r 2> /dev/null
66+
fi

implement-cowsay/.venv/bin/activate.csh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
# This file must be used with "source bin/activate.csh" *from csh*.
22
# You cannot run it directly.
3-
43
# Created by Davide Di Blasi <davidedb@gmail.com>.
54
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
65

7-
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
6+
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate'
87

98
# Unset irrelevant variables.
109
deactivate nondestructive
1110

12-
setenv VIRTUAL_ENV /home/tzemingho/GitHub/CYF/SDC/Module-Tools/implement-cowsay/.venv
11+
setenv VIRTUAL_ENV "/Users/cyf/GitHub/SDC/Module-Tools/implement-cowsay/.venv"
1312

1413
set _OLD_VIRTUAL_PATH="$PATH"
15-
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
14+
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
1615

1716

1817
set _OLD_VIRTUAL_PROMPT="$prompt"
1918

2019
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
21-
set prompt = '(.venv) '"$prompt"
22-
setenv VIRTUAL_ENV_PROMPT '(.venv) '
20+
set prompt = "(.venv) $prompt"
2321
endif
2422

2523
alias pydoc python -m pydoc

implement-cowsay/.venv/bin/activate.fish

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
2-
# (https://fishshell.com/). You cannot run it directly.
2+
# (https://fishshell.com/); you cannot run it directly.
33

44
function deactivate -d "Exit virtual environment and return to normal shell environment"
55
# reset old environment variables
@@ -13,17 +13,13 @@ function deactivate -d "Exit virtual environment and return to normal shell env
1313
end
1414

1515
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
16+
functions -e fish_prompt
1617
set -e _OLD_FISH_PROMPT_OVERRIDE
17-
# prevents error when using nested fish instances (Issue #93858)
18-
if functions -q _old_fish_prompt
19-
functions -e fish_prompt
20-
functions -c _old_fish_prompt fish_prompt
21-
functions -e _old_fish_prompt
22-
end
18+
functions -c _old_fish_prompt fish_prompt
19+
functions -e _old_fish_prompt
2320
end
2421

2522
set -e VIRTUAL_ENV
26-
set -e VIRTUAL_ENV_PROMPT
2723
if test "$argv[1]" != "nondestructive"
2824
# Self-destruct!
2925
functions -e deactivate
@@ -33,10 +29,10 @@ end
3329
# Unset irrelevant variables.
3430
deactivate nondestructive
3531

36-
set -gx VIRTUAL_ENV /home/tzemingho/GitHub/CYF/SDC/Module-Tools/implement-cowsay/.venv
32+
set -gx VIRTUAL_ENV "/Users/cyf/GitHub/SDC/Module-Tools/implement-cowsay/.venv"
3733

3834
set -gx _OLD_VIRTUAL_PATH $PATH
39-
set -gx PATH "$VIRTUAL_ENV/"bin $PATH
35+
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
4036

4137
# Unset PYTHONHOME if set.
4238
if set -q PYTHONHOME
@@ -56,7 +52,7 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
5652
set -l old_status $status
5753

5854
# Output the venv prompt; color taken from the blue of the Python logo.
59-
printf "%s%s%s" (set_color 4B8BBE) '(.venv) ' (set_color normal)
55+
printf "%s%s%s" (set_color 4B8BBE) "(.venv) " (set_color normal)
6056

6157
# Restore the return status of the previous command.
6258
echo "exit $old_status" | .
@@ -65,5 +61,4 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
6561
end
6662

6763
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
68-
set -gx VIRTUAL_ENV_PROMPT '(.venv) '
6964
end

implement-cowsay/.venv/bin/cowsay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/home/tzemingho/GitHub/CYF/SDC/Module-Tools/implement-cowsay/.venv/bin/python3
1+
#!/Users/cyf/GitHub/SDC/Module-Tools/implement-cowsay/.venv/bin/python3
22
# -*- coding: utf-8 -*-
33
import re
44
import sys

implement-cowsay/.venv/bin/pip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/home/tzemingho/GitHub/CYF/SDC/Module-Tools/implement-cowsay/.venv/bin/python3
1+
#!/Users/cyf/GitHub/SDC/Module-Tools/implement-cowsay/.venv/bin/python3
22
# -*- coding: utf-8 -*-
33
import re
44
import sys

implement-cowsay/.venv/bin/pip3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/home/tzemingho/GitHub/CYF/SDC/Module-Tools/implement-cowsay/.venv/bin/python3
1+
#!/Users/cyf/GitHub/SDC/Module-Tools/implement-cowsay/.venv/bin/python3
22
# -*- coding: utf-8 -*-
33
import re
44
import sys

implement-cowsay/.venv/bin/pip3.12

Lines changed: 0 additions & 8 deletions
This file was deleted.

implement-cowsay/.venv/bin/python3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/usr/bin/python3
1+
/Library/Developer/CommandLineTools/usr/bin/python3

0 commit comments

Comments
 (0)