Compare commits

..

3 commits

2 changed files with 6 additions and 6 deletions

View file

@ -17,7 +17,7 @@ if [ -f "$1" ]
then
$EDITOR $1
else
file=$(sh -c "find $root $ignore -type f" | fzf -m -1 -q "$*")
file=$(sh -c "find $root $ignore -type f" | fzf -i -m -1 -q "$*")
if [ "$?" -eq 0 ]
then
echo "$file" | xargs -d '\n' $EDITOR

10
zshrc
View file

@ -21,12 +21,12 @@ bindkey -v
which task > /dev/null && which jq > /dev/null
run_task_prompt=$?
task_prompt() {
if [ -z $run_task_prompt ]
if [ $run_task_prompt -eq 0 ]
then
tasks="$(task +ACTIVE export | jq -r '.[].description' | sed 's/^/‣ /')"
if [ -n "$tasks" ]
then
echo "\x1b[30m$tasks\n\x1b[0m"
echo "%F{black}$tasks\n%{%}"
fi
fi
}
@ -34,10 +34,10 @@ task_prompt() {
which timew > /dev/null
run_timew_prompt=$?
timew_prompt() {
if [ -z $run_timew_prompt ]
if [ $run_timew_prompt -eq 0 ]
then
if [ $(timew get dom.active) -eq "1" ]
then echo '\x1b[31m●\x1b[0m '
then echo '%F{red}● '
fi
fi
}
@ -52,7 +52,7 @@ ranger_prompt() {
}
prompt='$(task_prompt)%(?.%F{green}.%F{red})λ%F{blue}$(ranger_prompt)%f '
export PROMPT_full='%F{red}$(timew_prompt)%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
export PROMPT_full='$(timew_prompt)%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
'"$prompt"
export PROMPT_gitlong='%F{red}$(timew_prompt)$(gitprompt && echo -ne " ")%F$(git log --oneline --no-decorate -1 2>/dev/null)
%F{cyan}$(gitpath)'"$prompt"