office/khal: Updated for version 0.10.5. New email.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
15b7236a46
commit
749fa6c6fa
|
@ -6,3 +6,14 @@ ikhal (interactive khal) lets you browse and edit calendars and events
|
|||
|
||||
No support for editing the timezones of events yet
|
||||
Works with python 3.6+
|
||||
|
||||
To have completion with click, source the according file for your shell
|
||||
|
||||
in .bashrc
|
||||
. /usr/doc/khal-*/khal-complete.bash
|
||||
|
||||
in .zshrc
|
||||
. /usr/doc/khal-*/khal-complete.zsh
|
||||
|
||||
in .fishrc
|
||||
. /usr/doc/khal-*/khal-complete.fish
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
_khal_completion() {
|
||||
local IFS=$'\n'
|
||||
local response
|
||||
|
||||
response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD _KHAL_COMPLETE=bash_complete $1)
|
||||
|
||||
for completion in $response; do
|
||||
IFS=',' read type value <<< "$completion"
|
||||
|
||||
if [[ $type == 'dir' ]]; then
|
||||
COMPREPLY=()
|
||||
compopt -o dirnames
|
||||
elif [[ $type == 'file' ]]; then
|
||||
COMPREPLY=()
|
||||
compopt -o default
|
||||
elif [[ $type == 'plain' ]]; then
|
||||
COMPREPLY+=($value)
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
_khal_completion_setup() {
|
||||
complete -o nosort -F _khal_completion khal
|
||||
}
|
||||
|
||||
_khal_completion_setup;
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
function _khal_completion;
|
||||
set -l response;
|
||||
|
||||
for value in (env _KHAL_COMPLETE=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) khal);
|
||||
set response $response $value;
|
||||
end;
|
||||
|
||||
for completion in $response;
|
||||
set -l metadata (string split "," $completion);
|
||||
|
||||
if test $metadata[1] = "dir";
|
||||
__fish_complete_directories $metadata[2];
|
||||
else if test $metadata[1] = "file";
|
||||
__fish_complete_path $metadata[2];
|
||||
else if test $metadata[1] = "plain";
|
||||
echo $metadata[2];
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
complete --no-files --command khal --arguments "(_khal_completion)";
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
#compdef khal
|
||||
|
||||
_khal_completion() {
|
||||
local -a completions
|
||||
local -a completions_with_descriptions
|
||||
local -a response
|
||||
(( ! $+commands[khal] )) && return 1
|
||||
|
||||
response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) _KHAL_COMPLETE=zsh_complete khal)}")
|
||||
|
||||
for type key descr in ${response}; do
|
||||
if [[ "$type" == "plain" ]]; then
|
||||
if [[ "$descr" == "_" ]]; then
|
||||
completions+=("$key")
|
||||
else
|
||||
completions_with_descriptions+=("$key":"$descr")
|
||||
fi
|
||||
elif [[ "$type" == "dir" ]]; then
|
||||
_path_files -/
|
||||
elif [[ "$type" == "file" ]]; then
|
||||
_path_files -f
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$completions_with_descriptions" ]; then
|
||||
_describe -V unsorted completions_with_descriptions -U
|
||||
fi
|
||||
|
||||
if [ -n "$completions" ]; then
|
||||
compadd -U -V unsorted -a completions
|
||||
fi
|
||||
}
|
||||
|
||||
compdef _khal_completion khal;
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=khal
|
||||
VERSION=${VERSION:-0.10.4}
|
||||
VERSION=${VERSION:-0.10.5}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
@ -85,6 +85,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
|
|||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
*.rst doc/* \
|
||||
$CWD/khal-complete.* \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="khal"
|
||||
VERSION="0.10.4"
|
||||
VERSION="0.10.5"
|
||||
HOMEPAGE="https://github.com/pimutils/khal/"
|
||||
DOWNLOAD="https://files.pythonhosted.org/packages/7a/d8/9718385de260ebc07ff48c838e22fde6b05d143f1f8ab81ff1c8718d7102/khal-0.10.4.tar.gz"
|
||||
MD5SUM="fe8217ce83a367afef95c84c38a0f2b1"
|
||||
DOWNLOAD="https://files.pythonhosted.org/packages/d8/99/6ef24e33472b343800ffb7300e9702faa715ccd986a0a0706f01e44d8cb6/khal-0.10.5.tar.gz"
|
||||
MD5SUM="8f08f39be55125ec72f7eec8ec0ab835"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="python3-dateutil icalendar atomicwrites configobj tzlocal click click-log"
|
||||
MAINTAINER="Tonus"
|
||||
EMAIL="tonus1@gmail.com"
|
||||
EMAIL="tonus1@free.fr"
|
||||
|
|
Loading…
Reference in New Issue