diff options
| author | Hsieh Chin Fan <typebrook@gmail.com> | 2021-06-27 12:36:06 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <typebrook@gmail.com> | 2021-06-27 12:36:06 +0800 |
| commit | 134ee092ba3b8d00e46884a5cd422c2bc5dc33eb (patch) | |
| tree | 53e96502a08638e8115c9b94215f311a7a28f95d | |
| parent | 8cfb586fd69ecbce528f07889f1bd12a251c4ca0 (diff) | |
update
| -rwxr-xr-x | tools/init/load-settings.sh | 4 | ||||
| -rw-r--r-- | zsh/_cdg.zsh | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/tools/init/load-settings.sh b/tools/init/load-settings.sh index 9592b50..1990c1f 100755 --- a/tools/init/load-settings.sh +++ b/tools/init/load-settings.sh | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | if [[ $0 == 'zsh' ]]; then | 1 | if [[ $SHELL =~ zsh$ ]]; then |
| 2 | setopt extended_glob | 2 | setopt extended_glob |
| 3 | fpath=($SETTING_DIR/zsh $fpath) | 3 | fpath=($SETTING_DIR/zsh $fpath) |
| 4 | elif [[ $0 == 'bash' ]]; then | 4 | elif [[ $SHELL =~ bash$ ]]; then |
| 5 | shopt -s extglob | 5 | shopt -s extglob |
| 6 | fi | 6 | fi |
| 7 | 7 | ||
diff --git a/zsh/_cdg.zsh b/zsh/_cdg.zsh new file mode 100644 index 0000000..fe7e26b --- /dev/null +++ b/zsh/_cdg.zsh | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #compdef cdg | ||
| 2 | |||
| 3 | function _cdg() { | ||
| 4 | compadd -S '/' $(cd ~/git && ls -d ${words[2]}*) | ||
| 5 | } | ||
| 6 | |||
| 7 | _cdg | ||