= oh-my-zsh
potenciador de zsh con temas y plugins : [[https://ohmyz.sh/]]
== install
* ''sh -c %%"%%$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)%%"%%''
más: [[https://www.howtoforge.com/tutorial/how-to-setup-zsh-and-oh-my-zsh-on-linux/]]
* ''chsh -s $(which zsh)'' : cambiar shell a mano si no lo hace automaticamente
== config
* ''~/.oh-my-zsh/tools/theme_chooser.sh''
== internal plugins
* **dotenv**: autoejeción scripts predefinidos en directorios (set-up variables)
* wrapper de autoenv:[[https://github.com/inishchith/autoenv]]
* no funciona el **.leave**
* alternativa **zsh-autoenv**
* **zsh-autoenv** [[https://github.com/Tarrasch/zsh-autoenv]]
* [[linux:zsh:oh-my-zsh:autoenv]]
* no es un plugin nativo de oh-my-zsh
* se integra desde **.zshrc** con un ''source''
* funciona solo para zsh
* ficheros **.autoenv.zsh**
* instrucciones interesantes:
* ''autostash VAR=VALOR'' -> setea nuevo valor, conservando el anterior y lo recupera al salir del directorio
* ubicación ficheros autorizados: ''~/.local/share/autoenv_auth''
* **transfer**: cli para [[https://transfer.sh]]
* **zsh-syntax-highlighting**:
* apt-get install zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM}/plugins/zsh-syntax-highlighting
# ya no: echo "source ${ZSH}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
* añadir a la sección de plugins
* **zsh-autosuggestions**:
* git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
* añadir a la sección de plugins
* **colored-man-pages**
* **coloriza**
* **copybuffer**: CRTL+o para copiar texto seleccionado o linea cursor a portapapeles
* **copyfile**: ''copyfile '' a portapapeles
* problemas, requiere libteria adicional
* lib:[[https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/clipboard.zsh]]
* **docker**
* **docker-compose**
* **git**
* **gitignore**: cli a gitignore.io
* deprecated?
* **zsh_reload**: ''src'' para recargar sesión -> deprecated -> ''omz reload''
* **zsh-bat**
* ''bat'', sustituto mejorado de ''cat''
* sustituye ''cat'' por ''bat''
* git clone https://github.com/fdellwing/zsh-bat.git $ZSH_CUSTOM/plugins/zsh-bat
* añadir a la sección **plugins** de **~/.zshrc**: **command-time**
* **zsh-command-time**
* git clone https://github.com/popstas/zsh-command-time.git ~/.oh-my-zsh/custom/plugins/command-time
* añadir a la sección **plugins** de **~/.zshrc**
* personalización:# If command execution time above min. time, plugins will output time.
ZSH_COMMAND_TIME_MIN_SECONDS=3
# Message to display (set to "" for disable).
ZSH_COMMAND_TIME_MSG="Execution time: %s sec"
# Message color.
ZSH_COMMAND_TIME_COLOR="cyan"
# Exclude some commands
ZSH_COMMAND_TIME_EXCLUDE=(vim mcedit)
* ''$ZSH_COMMAND_TIME'' contiene el valor de tiempo del último comando
== external plugins
* [[https://tau.gr/posts/2021-06-08-zsh-command-time/]]
* cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/tom-auger/cmdtime
* add to ''~/.zshrc''