Check if todo.sh already installed, correct path to it
This commit is contained in:
5
.zshrc
5
.zshrc
@@ -118,10 +118,7 @@ export MARKER_KEY_NEXT_PLACEHOLDER="\C-b" #change maker key binding from Ctr+t
|
|||||||
|
|
||||||
[[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh"
|
[[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh"
|
||||||
|
|
||||||
export PATH=$PATH:~/.todo/bin
|
export PATH=$PATH:~/.quickzsh/todo/bin #usig alias doesn't properly work
|
||||||
|
|
||||||
#alias todo.sh="~/.quickzsh/todo/todo.sh"
|
|
||||||
#complete -F _todo todo.sh #enable autocompletion for the alias, only needed if different alias
|
|
||||||
|
|
||||||
|
|
||||||
SAVEHIST=50000 #save upto 50,000 lines in history. oh-my-zsh default is 10,000
|
SAVEHIST=50000 #save upto 50,000 lines in history. oh-my-zsh default is 10,000
|
||||||
|
|||||||
@@ -93,11 +93,16 @@ fi
|
|||||||
# mkdir ~/.quickzsh/todo/bin ; cp -f ~/.quickzsh/todo/todo.sh ~/.quickzsh/todo/bin/todo.sh # cp todo.sh to ./bin so only it is included in $PATH
|
# mkdir ~/.quickzsh/todo/bin ; cp -f ~/.quickzsh/todo/todo.sh ~/.quickzsh/todo/bin/todo.sh # cp todo.sh to ./bin so only it is included in $PATH
|
||||||
# #touch ~/.todo/config # needs it, otherwise spits error , yeah a bug in todo
|
# #touch ~/.todo/config # needs it, otherwise spits error , yeah a bug in todo
|
||||||
# ln -s ~/.quickzsh/todo ~/.todo
|
# ln -s ~/.quickzsh/todo ~/.todo
|
||||||
|
if [ ! -L ~/.quickzsh/todo/bin/todo.sh ]; then
|
||||||
|
echo -e "Installing todo.sh in ~/.quickzsh/todo\n"
|
||||||
mkdir -p ~/.quickzsh/todo/bin
|
mkdir -p ~/.quickzsh/todo/bin
|
||||||
wget "https://github.com/todotxt/todo.txt-cli/releases/download/v2.11.0/todo.txt_cli-2.11.0.tar.gz" -P ~/.quickzsh/
|
wget "https://github.com/todotxt/todo.txt-cli/releases/download/v2.11.0/todo.txt_cli-2.11.0.tar.gz" -P ~/.quickzsh/
|
||||||
tar xvf ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz -C ~/.quickzsh/todo --strip 1 && rm ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz
|
tar xvf ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz -C ~/.quickzsh/todo --strip 1 && rm ~/.quickzsh/todo.txt_cli-2.11.0.tar.gz
|
||||||
ln -s ~/.quickzsh/todo/todo.sh ~/.quickzsh/todo/bin/todo.sh # so only .../bin is included in $PATH
|
ln -s ~/.quickzsh/todo/todo.sh ~/.quickzsh/todo/bin/todo.sh # so only .../bin is included in $PATH
|
||||||
ln -s ~/.quickzsh/todo/todo.cfg ~/.todo.cfg # it expects it there or ~/todo.cfg or ~/.todo/config
|
ln -s ~/.quickzsh/todo/todo.cfg ~/.todo.cfg # it expects it there or ~/todo.cfg or ~/.todo/config
|
||||||
|
else
|
||||||
|
echo -e "todo.sh is already instlled in ~/.quickzsh/todo\n"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $1 == "--cp-hist" ]]; then
|
if [[ $1 == "--cp-hist" ]]; then
|
||||||
echo -e "\nCopying bash_history to zsh_history\n"
|
echo -e "\nCopying bash_history to zsh_history\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user