Dynamic dir-change handling for git probe.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#if ( ! $?cshenv_gitdirs )
|
||||
set cshenv_gitdirs=( /home/adam/cshenv:/home/adam/cshenv/.git )
|
||||
|
||||
set _masked_cwd=$cwd:as/ //
|
||||
#echo "${_masked_cwd}"
|
||||
set _search_key="${_masked_cwd}"
|
||||
#echo "${_search_key}"
|
||||
#echo "dirs $cshenv_gitdirs"
|
||||
#echo "cache-match $cshenv_gitdirs:as/${_masked_cwd}//"
|
||||
#echo "cache-match $cshenv_gitdirs:gx/^${_search_key}*/"
|
||||
#set _cache_match = ( $cshenv_gitdirs:gx^${_search_key}* )
|
||||
|
||||
#if ( ${#_cache_match} == 1 ) then
|
||||
#echo "Found ${_cache_match}"
|
||||
#else
|
||||
set _git_check=( `git rev-parse --git-dir |&cat` )
|
||||
#if ( -d "${_git_check}" ) then
|
||||
#echo "Found and installed ${_git_check} git dir"
|
||||
#set _masked_git=$_git_check:as/ //
|
||||
#set cshenv_dirs=( ${cshenv_dirs} "${_masked_cwd}${masked_git}" )
|
||||
#else
|
||||
#echo "Found no git dir for ${_masked_cwd}"
|
||||
#set cshenv_dirs=( ${cshenv_dirs} "${_masked_cwd}" )
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user