Archive unused files, pending deletion
This commit is contained in:
29
archive/fish/functions/vv.fish
Normal file
29
archive/fish/functions/vv.fish
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
function vv
|
||||
pushd . &> /dev/null
|
||||
function find_root
|
||||
set -l dir $PWD
|
||||
|
||||
if test -d $dir/venv
|
||||
echo $dir
|
||||
return 0
|
||||
end
|
||||
|
||||
if test -d .git -o "$dir" = "/"
|
||||
return 1
|
||||
end
|
||||
|
||||
cd ..
|
||||
find_root
|
||||
end
|
||||
|
||||
if not find_root &> /dev/null
|
||||
echo "Couldn't find venv"
|
||||
popd &> /dev/null
|
||||
return 1
|
||||
end
|
||||
|
||||
source (find_root)/venv/bin/activate.fish
|
||||
popd &> /dev/null
|
||||
end
|
||||
Reference in New Issue
Block a user