[BUGFIX] fixed duplicate function name and resolve symlinks again
This commit is contained in:
parent
854e69c134
commit
3b60a916f0
@ -10,7 +10,7 @@
|
||||
|| return 0
|
||||
|
||||
_CA__ZSH_SHORTCUT_PLUGIN() {
|
||||
local OPTIONS=(clone new $(_CA_LIST))
|
||||
local OPTIONS=($(_CA_GET_LIST))
|
||||
[ $_CA_ENV ] && OPTIONS=(deactivate $OPTIONS)
|
||||
|
||||
local SELECTION=$(echo $OPTIONS | _CA_MULTILINE | _CA_FZF 'select a project')
|
||||
|
@ -11,7 +11,7 @@ _CA__PROJECT_COMPADD() {
|
||||
|
||||
_describe 'commands' DESCRIPTIONS
|
||||
|
||||
compadd -- $(_CA_LIST)
|
||||
compadd -- $(_CA_GET_LIST)
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
|
12
global.zsh
12
global.zsh
@ -22,14 +22,14 @@ _CA_MULTILINE() { sed 's/\s\+/\n/g'; }
|
||||
|
||||
_CA_LIST() {
|
||||
local base_dir PROJECTS=()
|
||||
{
|
||||
for base_dir in $CA__DIRS
|
||||
for base_dir in $CA__DIRS
|
||||
do
|
||||
[ ! -d $base_dir ] && continue
|
||||
for project_dir in $(find "$base_dir" -mindepth 1 -maxdepth 1 \( -type d -o -type l \) )
|
||||
do
|
||||
[ ! -d $base_dir ] && continue
|
||||
{ cd $base_dir; ls -d *; } \
|
||||
| awk '{print "'$(basename $base_dir)/'"$1;}'
|
||||
echo $(basename $base_dir)/$(basename $project_dir)
|
||||
done
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
|
3
zsh/list.zsh
Normal file
3
zsh/list.zsh
Normal file
@ -0,0 +1,3 @@
|
||||
_CA_GET_LIST() {
|
||||
echo "clone new $(_CA_LIST)" | sed 's/ /\n/g'
|
||||
}
|
Loading…
Reference in New Issue
Block a user