This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env fish | |
function cd -d "change directory, and activate virtualenvs, if available" | |
# first and foremost, change directory | |
builtin cd $argv | |
# find a parent git directory | |
if git rev-parse --show-toplevel >/dev/null ^/dev/null | |
set gitdir (realpath (git rev-parse --show-toplevel)) | |
else |