- Fixes `readlink -e` dependency which isn't supported in macOS
(fixes#3235).
- Uses native zsh wildcard expansion instead of calls to `ls`.
- Prepends commands with `command` and `builtin` to bypass aliases
and functions.
- Documents CTRL+G key binding to substitute mark name in the command
line with the mark path (https://github.com/ohmyzsh/ohmyzsh/pull/2045#issuecomment-22826540).
Before, when typing the `marks` command, longer mark keys would cause
the tabs to spill over to the next tab stop, like so:
rc -> /home/ahlex/.rc
repos -> /home/ahlex/repos
a-longer-string -> /tmp
Implement better key display by running through all of the marks twice,
once to get the longest key length, and the second time to format
everything according to that length:
rc -> /home/ahlex/.rc
repos -> /home/ahlex/repos
a-longer-string -> /tmp
Using the `jump` plugin, using the `marks` command will yield this output:
```
$ marks
desktop marks:printf:5: bad option: ->
dotfiles marks:printf:5: bad option: ->
home marks:printf:5: bad option: ->
```
the `marks` function uses `printf` with `->` and I believe `-` is used by `printf` for left-justification. changing this to `-- "->"` seems to render the appropriate output.
```
desktop -> /Users/uname/Desktop
dotfiles -> /Users/uname/.dotfiles
home -> /Users/uname
```
This allows for the user to combine the jump command with something else. In my example cd and jump are now combined like this:
```bash
jumpcd() {
jump $1 > /dev/null || cd $1
}
alias cd="jumpcd"
```
Autocompletion fails if there's only one mark, since the ls command
will not display the parent directory with the trailing colon.
Handling the single mark case separately and validating the symlink
explicitly, resolves the issue.