m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/completion
AgeCommit message (Collapse)Author
2016-02-06zsh-completion: add prefix zstyleBenjamin Richter
This option can be used to select a different pass repository for completion. A configuration example is given inside the completion file.
2016-02-06Fix zsh completion when path contains \Simon Gomizelj
2016-02-06completion: Output a space when appropriate on bash completionAnas Syed
Did this by not passing "-o nospace" to complete. Instead, put "compopt -o nospace" after a COMPREPLY that shouldn't add a space when autocompleting the only match
2015-05-11bashcomp: PASSWORD_STORE_DIR env var does not necessarily have a trailing slashSamuel Lethiec
2014-07-29Fix pass zsh completion and autoloadingMarc Cornellà
When autocompleting from `pass <TAB>', sometimes the following errors appear: _values:compvalues:10: not enough arguments find: `/home/user/.password-store': No such file or directory _values:compvalues:10: not enough arguments find: `/home/user/.password-store': No such file or directory The `_values' error happens when there is no password-store folder *or* there are no passwords in pass; the `find' error only when there is no password-store folder. We can trace it back to line 108, which contains the only `_values' statement that is executed when we autocomplete from pass. We confirm this by following the trail of execution, which is _pass -> _pass_cmd_show -> _pass_complete_entries -> -> _pass_complete_entries_helper If we try running the command inside `$()' on line 104, we see that it returns nothing and the output is blank. This means that `_values' only receives 1 of its 2 mandatory parameters, therefore the above error is triggered (not enough arguments). That is unless we don't have a password-store folder, in which case the `find: [...] no such file or directory' error is *also* triggered. We solve the first error by supplying a default value of "" if the command outputs nothing, using the zsh construct ${var:-else}. We solve the second error by redirecting the find command's stderr output to /dev/null, so the error is effectively suppressed. * * * * This patch also fixes the first tab completion, which currently only loads the completion function definition. We do this by adding a `_pass' statement at the end of the file, which runs the `_pass' completion function after loading its definition. This is the standard way an autoloaded function works; for other examples look at zsh's official completion files.
2014-05-08completion: add new generate flagsJason A. Donenfeld
2014-05-08zsh: posix compatible sed fix for zsh-completionJason A. Donenfeld
This reverts commit 56381287a16792b4c6410f07db68e02f3574c213, and further fixes things.
2014-05-06zsh-completion: regression when using BSD sedKyle Marek-Spartz
Made sed expression GNU and BSD compatible. A recent change in pass.zsh-completion broke autocompletion when using BSD sed. I’ve made the relevant sed expression compatible with GNU and BSD sed. Previous change with regression: http://lists.zx2c4.com/pipermail/password-store/2014-April/000773.html http://git.zx2c4.com/password-store/commit/src/completion/pass.zsh-completion?id=f82e9d6cf3bc3a12bdfce89bf319d76f79e66efc
2014-04-22zsh-completion: only remove next char if /Jason A. Donenfeld
From Kevin: I found a small bug in the zsh completions. Basically when the PASSWORD_STORE_DIR ends in a slash the first character of the result is eaten, making completion essentially useless. (It does this before determining matches). This can be fixed by changing what is line 106 in my version from: _values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##' | sort) to _values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}/\\?##" -e 's#\.gpg##' | sort) The difference is the first sed regex expression. The original version assumed that the next character was a slash and removed it while the new version only removes it if it is a slash. "s#${prefix}.##" -> "s#${prefix}/\\?##" Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reported-by: Kevin Cox <kevincox@kevincox.ca>
2014-04-18bash-completion: filter dot files from resultsJason A. Donenfeld
2014-04-18reencrypt: remove option, do automaticallyJason A. Donenfeld
2014-04-18reencryption: add to completion filesJason A. Donenfeld
2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld
2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld
Based-on-work-by: Matthieu Weber <mweber@free.fr> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2014-04-15grep: add to completion filesJason A. Donenfeld
2014-04-15find: add find/search commandJason A. Donenfeld
This relies on a patched version of tree to work, unfortunately. Hopefully upstream will accept our patch. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2014-04-06Make completion cleaner.Jason A. Donenfeld
2014-04-06bash-completion: complete the new init -p switch.Jason A. Donenfeld
2014-03-24Update zsh completion.Johan Venant
2014-03-24Add some commonly used completions for `pass git`Dmitry Medvinsky
2014-03-24Update copyright years and email addressDmitry Medvinsky
2014-03-24Add `-p` `--path` option completion for `pass init`Dmitry Medvinsky
2014-03-22Makefile: do not use recursion and organizeJason A. Donenfeld