Skip to content

Commit

Permalink
feat(fd): update fd completion to v8.3.2 (ohmyzsh#10688)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored and kareefardi committed Feb 21, 2022
1 parent 1b4c5a9 commit 56c6c6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 0 additions & 4 deletions plugins/fd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ To use it, add `fd` to the plugins array in your zshrc file:
```zsh
plugins=(... fd)
```

Completion is taken from the fd release [`8.2.1`](https://github.com/sharkdp/fd/releases/tag/v8.2.1).

Updated on April 1st, 2021.
9 changes: 7 additions & 2 deletions plugins/fd/_fd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#compdef fd fdfind
#compdef fd

##
# zsh completion function for fd
Expand Down Expand Up @@ -57,6 +57,7 @@ _fd() {
+ no-ignore-partial # some ignore files
"(no-ignore-full --no-ignore-vcs)--no-ignore-vcs[don't respect .gitignore files]"
"!(no-ignore-full --no-global-ignore-file)--no-global-ignore-file[don't respect the global ignore file]"
$no'(no-ignore-full --no-ignore-parent)--no-ignore-parent[]'

+ '(case)' # case-sensitivity
{-s,--case-sensitive}'[perform a case-sensitive search]'
Expand Down Expand Up @@ -138,6 +139,7 @@ _fd() {
+ '(exec-cmds)' # execute command
'(long-listing max-results)'{-x+,--exec=}'[execute command for each search result]:command: _command_names -e:*\;::program arguments: _normal'
'(long-listing max-results)'{-X+,--exec-batch=}'[execute command for all search results at once]:command: _command_names -e:*\;::program arguments: _normal'
'(long-listing max-results)--batch-size=[max number of args for each -X call]:size'

+ other
'!(--max-buffer-time)--max-buffer-time=[set amount of time to buffer before showing output]:time (ms)'
Expand All @@ -153,6 +155,9 @@ _fd() {
$no'(--base-directory)--base-directory=[change the current working directory to the given path]:directory:_files -/'
$no'(*)*--search-path=[set search path (instead of positional <path> arguments)]:directory:_files -/'

+ strip-cwd-prefix
$no'(strip-cwd-prefix exec-cmds)--strip-cwd-prefix[Strip ./ prefix when output is redirected]'

+ args # positional arguments
'1: :_guard "^-*" pattern'
'(--search-path)*:directory:_files -/'
Expand Down Expand Up @@ -220,7 +225,7 @@ _fd() {
_fd "$@"

# ------------------------------------------------------------------------------
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
# Copyright (c) 2011 GitHub zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down

0 comments on commit 56c6c6f

Please sign in to comment.