@@ -29,6 +29,23 @@ function can_haz() {
2929 which " $@ " > /dev/null 2>&1
3030}
3131
32+ function zqs-compdef-as() {
33+ if [ $# == 0 ]; then
34+ echo " Makes it simpler to use one command's completions for another command too"
35+ echo
36+ echo " Usage: zqs-compdef-as sourcecommand target"
37+ echo
38+ echo " Example: To make z.lua use the same completions as cd, run"
39+ echo
40+ echo " zqs-compdef-as cd _zlua"
41+ fi
42+ if (( $+ _comps[$1 ])) ; then
43+ compdef $_comps [$1 ] ${^@ [2,-1]} =$1
44+ else
45+ echo " Could not find a compdef for $1 "
46+ fi
47+ }
48+
3249function zqs-debug() {
3350 if [[ -f ${ZDOTDIR:- $HOME } /.zqs-debug-mode ]]; then
3451 echo $@
@@ -889,6 +906,7 @@ function zqs() {
889906 echo " Disabling 1password ssh-agent. New ZSH sessions will no longer use 1password's ssh agent."
890907 _zqs-set-setting use-1password-ssh-agent false
891908 ;;
909+
892910 ' enable-1password-agent' )
893911 echo " Enabling 1password ssh-agent. New ZSH sessions will use 1password's ssh agent."
894912 _zqs-set-setting use-1password-ssh-agent true
@@ -897,19 +915,23 @@ function zqs() {
897915 ' disable-bindkey-handling' )
898916 zsh-quickstart-disable-bindkey-handling
899917 ;;
918+
900919 ' enable-bindkey-handling' )
901920 zsh-quickstart-enable-bindkey-handling
902921 ;;
903922
904923 ' disable-control-c-decorator' )
905924 zqs-quickstart-disable-control-c-decorator
906925 ;;
926+
907927 ' enable-control-c-decorator' )
908928 zqs-quickstart-enable-control-c-decorator
909929 ;;
930+
910931 ' disable-debug-mode' )
911932 rm -f ${ZDOTDIR:- $HOME } /.zqs-debug-mode
912933 ;;
934+
913935 ' enable-debug-mode' )
914936 date > ${ZDOTDIR:- $HOME } /.zqs-debug-mode
915937 ;;
@@ -918,6 +940,7 @@ function zqs() {
918940 echo " Disabling diff-so-fancy plugin. New ZSH sessions will no longer use the plugin."
919941 _zqs-set-setting diff-so-fancy false
920942 ;;
943+
921944 ' enable-diff-so-fancy' )
922945 echo " Enabling diff-so-fancy plugin. It will be loaded the next time you start a ZSH session."
923946 _zqs-set-setting diff-so-fancy true
@@ -926,34 +949,39 @@ function zqs() {
926949 ' disable-zmv-autoloading' )
927950 _zqs-disable-zmv-autoloading
928951 ;;
952+
929953 ' enable-zmv-autoloading' )
930954 _zqs-enable-zmv-autoloading
931955 ;;
932956
933957 ' disable-omz-plugins' )
934958 zsh-quickstart-disable-omz-plugins
935959 ;;
960+
936961 ' enable-omz-plugins' )
937962 zsh-quickstart-enable-omz-plugins
938963 ;;
939964
940965 ' enable-ssh-askpass-require' )
941966 zsh-quickstart-enable-ssh-askpass-require
942967 ;;
968+
943969 ' disable-ssh-askpass-require' )
944970 zsh-quickstart-disable-ssh-askpass-require
945971 ;;
946972
947973 ' enable-ssh-key-listing' )
948974 _zqs-set-setting list-ssh-keys true
949975 ;;
976+
950977 ' disable-ssh-key-listing' )
951978 _zqs-set-setting list-ssh-keys false
952979 ;;
953980
954981 ' disable-ssh-key-loading' )
955982 _zqs-set-setting load-ssh-keys false
956983 ;;
984+
957985 ' enable-ssh-key-loading' )
958986 _zqs-set-setting load-ssh-keys true
959987 ;;
@@ -964,10 +992,12 @@ function zqs() {
964992 rm -f ${ZDOTDIR:- $HOME } /.zqs-zprof-enabled
965993 echo " New ZSH sessions will no longer use profiling."
966994 ;;
995+
967996 ' enable-zsh-profiling' )
968997 touch ${ZDOTDIR:- $HOME } /.zqs-zprof-enabled
969998 echo " New ZSH sessions will use profiling."
970999 ;;
1000+
9711001 * )
9721002 zqs-help
9731003 ;;
@@ -978,3 +1008,5 @@ function zqs() {
9781008if [[ -f ${ZDOTDIR:- $HOME } /.zqs-zprof-enabled ]]; then
9791009 zprof
9801010fi
1011+
1012+ [ -f ~ /.fzf.zsh ] && source ~ /.fzf.zsh
0 commit comments