We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
zqs-compdef-as
1 parent 3248398 commit df5ff34Copy full SHA for df5ff34
zsh/.zshrc
@@ -29,6 +29,23 @@ function can_haz() {
29
which "$@" > /dev/null 2>&1
30
}
31
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
38
+ echo "Example: To make z.lua use the same completions as cd, run"
39
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
47
+}
48
+
49
function zqs-debug() {
50
if [[ -f ${ZDOTDIR:-$HOME}/.zqs-debug-mode ]]; then
51
echo $@
0 commit comments