1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 06:40:07 +00:00
Commit graph

21 commits

Author SHA1 Message Date
Marc Cornellà
561e7169ac jump: fix for `marks' and CTRL+G key binding
- marks printed an error when $MARKPATH didn't exist or didn't have any marks
  in it.
- The CTRL+G key binding overwrote an argument when it couldn't match it to
  an existing mark.
2020-02-11 20:12:01 +01:00
hqingyi
3c5bbcf5b9 jump: add support for directories starting with a dot (#4661)
Closes #4661
2020-02-11 19:51:56 +01:00
Marc Cornellà
bc67a55fe8 jump: fix issues in plugin and document CTRL+G key binding
- 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).
2020-02-11 19:41:43 +01:00
Alexander Huynh
3c3766fdf5 Provide even spacing between marks (#7456)
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
2018-12-31 11:15:14 -08:00
Jonatan Skogsfors
fe4ac966fa jump: use more compatible flag for ln (#7205)
The flag '-h' isn't universal across implementation. According to FreeBSD man page for ln you can use 'n'.
2018-10-03 17:30:17 +02:00
Rubén Durán Balda
ca45d510dd jump: fix behavior when reusing a mark (#7197)
Force the mark to point to the new dir, replacing the old one.

Fixes #7195
2018-10-03 16:19:46 +02:00
Ross Lafferty
0853b74fef jump: fix printf path output (#7105)
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
```
2018-09-01 13:37:05 +02:00
diego
d69f2850af Add non 0 exit code for missing jump targets (#5500)
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"
```
2016-10-07 23:54:54 +02:00
Octavian Neamtu
fb5b83d10d Fixed jump pluging to display the right mark name on 'mark . ' 2015-06-11 21:10:36 +02:00
Marc Cornellà
2193135ebc Clean up appearance lib file and redundant colors calls in other files 2015-02-10 19:22:50 +01:00
Marc Cornellà
4310a15de5 Change all pwd calls for $PWD variable
This avoids spawning additional processes as $PWD **always** contains
the current working directory.
2014-11-06 18:33:56 +01:00
Jannik Zschiesche
75c02dd53e Plugin jump: autocompletion for numbers and dots
This change fixes the autocompletion for marks which contain numbers or dots.

Fixes #2578

`\d` in sed regular expressions doesn't work (see http://stackoverflow.com/questions/14671293/why-does-d-doesnt-work-in-regular-expression-in-sed)
2014-06-28 10:12:20 +02:00
Thomas Hipp
91b6a6b5a4 jump plugin: fix autocompletion with single mark
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.
2013-09-18 17:13:12 +02:00
Jeroen Janssens
d3e005d6b4 Fix aliasing pwd 2013-09-06 15:29:14 -04:00
Jeroen Janssens
255b0c4f5e Mark function asks for confirmation and uses basename of directory when no argument is given 2013-09-06 09:55:43 -04:00
Jeroen Janssens
55d4873f91 Change marks function and remove 'function' keyword as suggested by pielgrzym in https://github.com/robbyrussell/oh-my-zsh/pull/2045#issuecomment-22820224 2013-09-06 09:40:44 -04:00
Jeroen Janssens
4517db6acc Add _completemarks function as suggested by pielgrzym in https://github.com/robbyrussell/oh-my-zsh/pull/2045#issuecomment-22826540 2013-09-06 09:34:27 -04:00
Justin Aiken
a265acee4f Better filename matching 2013-09-05 10:00:14 -06:00
Justin Aiken
128cd3f566 Filter out missing links with jump autocomplete 2013-09-05 09:39:22 -06:00
Jeroen Janssens
73c22c146c Add tab completion for jump plugin 2013-08-18 14:16:26 -04:00
Jeroen Janssens
e368bf1d4a Add jump plugin, which allows you to easily jump around the file system 2013-08-15 10:32:01 -04:00