Smarter installation of iTerm2 shell integration, including missing utility commands

This commit is contained in:
Danielle McLean 2018-06-18 15:33:28 +10:00
parent 62871f6dda
commit 56406c8c29
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240

View file

@ -2,10 +2,15 @@
ITERM2_DIR=$XDG_CACHE_HOME/zsh/iterm2 ITERM2_DIR=$XDG_CACHE_HOME/zsh/iterm2
if [[ ! -r $ITERM2_DIR/startup.zsh ]]; then if [[ ! -r $ITERM2_DIR/startup.zsh ]]; then
mkdir -p $ITERM2_DIR/bin mkdir -p $ITERM2_DIR/bin
curl -fLo $ITERM2_DIR/startup.zsh https://iterm2.com/misc/zsh_startup.in
for cmd in imgcat it2dl; do print Installing iTerm2 shell integration...
curl -fLo $ITERM2_DIR/bin/$cmd https://iterm2.com/$cmd curl -sfLo $ITERM2_DIR/startup.zsh https://iterm2.com/shell_integration/zsh
chmod u+x $ITERM2_DIR/bin/$cmd
print Installing iTerm2 utilities...
for cmd in imgcat imgls it2attention it2check it2copy it2dl it2getvar it2setcolor it2setkeylabel it2ul it2universion; do
curl -sfLo $ITERM2_DIR/bin/$cmd https://iterm2.com/utilities/$cmd &&
chmod u+x $ITERM2_DIR/bin/$cmd &&
print Installed iTerm2 utility: $cmd
done done
fi fi
source $ITERM2_DIR/startup.zsh source $ITERM2_DIR/startup.zsh