added ability to edit current zsh command in editor.

This commit is contained in:
Gabe Venberg 2026-01-29 12:25:46 +01:00
parent daa85d3277
commit 4925296194
3 changed files with 5 additions and 6 deletions

View file

@ -42,15 +42,16 @@
# Turn off terminal beep on autocomplete.
unsetopt BEEP
#edit command line in editor with v
autoload edit-command-line; zle -N edit-command-line
bindkey -M vicmd v edit-command-line
#cheat.sh is a wonderful tool, the less typing needed the better.
cheat(){
for i in "$@"; do
curl cheat.sh/"$i"
done
}
#the tre command has some shell integration.
tre() { command tre "$@" --editor && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
tred() { command tre "$@" --editor=z --directories && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
#moves a file, leaving a symlink in its place.
mvln(){