ZSH completions
This commit is contained in:
parent
c709793a7d
commit
b9cf6d786c
|
@ -28,9 +28,10 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{share/man/man1,bin}
|
mkdir -p $out/{share/man/man1,bin,share/zsh/site-functions}
|
||||||
cp bin/* $out/bin/
|
cp bin/* $out/bin/
|
||||||
cp *.1 $out/share/man/man1
|
cp completions/* $out/share/zsh/site-functions/
|
||||||
|
cp *.1 $out/share/man/man1/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
usage(){ printf "Usage: %s -s|f|r|d|R|h\n" $(basename $0); }
|
usage(){ printf "Usage: %s -s|f|r|d|R|h\n" $(basename $0); }
|
||||||
|
[ $# -eq 0 ] && usage && exit 2
|
||||||
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
|
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
|
||||||
while getopts sfrdRh name; do
|
while getopts sfrdRh name; do
|
||||||
case $name in
|
case $name in
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
usage(){
|
usage(){ printf "Usage: %s -s|f|r|d|R|h\n" $(basename $0); }
|
||||||
printf "Usage: %s -s|f|r|d|R|h\n" $(basename $0)
|
[ $# -eq 0 ] && usage && exit 2
|
||||||
}
|
|
||||||
|
|
||||||
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
|
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
|
||||||
while getopts sfrdRh name; do
|
while getopts sfrdRh name; do
|
||||||
case $name in
|
case $name in
|
||||||
|
|
18
src/completions/_copy-bookmark
Normal file
18
src/completions/_copy-bookmark
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#compdef _copy-bookmark copy-bookmark
|
||||||
|
|
||||||
|
_arguments : \
|
||||||
|
"(-f -r -d -R -h)-f[use 'fzf' to open bookmarks file]" \
|
||||||
|
"(-s -r -d -R -h)-r[use 'rofi' to open bookmarks file]" \
|
||||||
|
"(-s -f -d -R -h)-s[use 'sk' to open bookmarks file]" \
|
||||||
|
"(-s -f -r -R -h)-d[use '$MENU' to open bookmarks file]" \
|
||||||
|
"(-s -f -r -d -h)-R[copy random bookmark]" \
|
||||||
|
"(-s -f -r -d -R)-h[print usage and exit]"
|
||||||
|
_arguments : $arguments
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
18
src/completions/_open-bookmark
Normal file
18
src/completions/_open-bookmark
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#compdef _open-bookmark open-bookmark
|
||||||
|
|
||||||
|
_arguments : \
|
||||||
|
"(-f -r -d -R -h)-f[use 'fzf' to open bookmarks file]" \
|
||||||
|
"(-s -r -d -R -h)-r[use 'rofi' to open bookmarks file]" \
|
||||||
|
"(-s -f -d -R -h)-s[use 'sk' to open bookmarks file]" \
|
||||||
|
"(-s -f -r -R -h)-d[use '$MENU' to open bookmarks file]" \
|
||||||
|
"(-s -f -r -d -h)-R[open random bookmark]" \
|
||||||
|
"(-s -f -r -d -R)-h[print usage and exit]"
|
||||||
|
_arguments : $arguments
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue