This file shows examples of shell functions that consumes output of ea print. It is recommended to include them as part of your ea workflow.
This shell function enables typing e NUM in shell to open the path corrsponding to NUM in your default editor.
Find the shell/editor combination you need below!
| Bash | Zsh | Fish | |
|---|---|---|---|
| Vim/NeoVim | link | link | link |
| VSCode | link | link | link |
| Emacs | link | link | link |
| TextMate | link | link | link |
e() {
eval $(ea p $1 "$EDITOR '{path}' '+call cursor({line}, {column})'")
}function e {
eval $(ea p $1 "$EDITOR '{path}' '+call cursor({line}, {column})'")
}function e
eval (ea p $argv '$EDITOR "{path}" "+call cursor({line}, {column})"')
ende() {
eval $(ea p $1 "code --goto '{path}:{line}:{column}'")
}function e {
eval $(ea p $1 "code --goto '{path}:{line}:{column}'")
}function e
eval (ea p $argv "code --goto '{path}:{line}:{column}'")
ende() {
eval $(ea p $1 "emacs +{line}:{column} '{path}'")
}function e {
eval $(ea p $1 "emacs +{line}:{column} '{path}'")
}function e
eval (ea p $argv "emacs +{line}:{column} '{path}'")
ende() {
eval $(ea p $1 "mate -l {line}:{column} '{path}'")
}function e {
eval $(ea p $1 "mate -l {line}:{column} '{path}'")
}function e
eval (ea p $argv "mate -l {line}:{column} '{path}'")
end