This repository has been archived by the owner on Dec 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tab completion, stubs for lock/unlock
- Loading branch information
1 parent
f6c3115
commit ee9a405
Showing
5 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "pw" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
authors = ["Oliver Jensen <[email protected]>"] | ||
|
||
[dependencies.rusqlite] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
_pw() | ||
{ | ||
local cur prev | ||
COMPREPLY=() | ||
cur="${COMP_WORDS[COMP_CWORD]}" | ||
prev="${COMP_WORDS[COMP_CWORD-1]}" | ||
|
||
commands="add edit delete list show copy lock unlock" | ||
|
||
case "$prev" in | ||
pw) | ||
COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) | ||
return 0 | ||
;; | ||
edit|delete|show|copy) | ||
COMPREPLY=( $(compgen -W "`pw --comp-name`" -- ${cur}) ) | ||
return 0 | ||
;; | ||
add|list) | ||
COMPREPLY=( $(compgen -W "sections `pw --comp-sec`" -- ${cur}) ) | ||
return 0 | ||
;; | ||
*) | ||
;; | ||
esac | ||
|
||
} | ||
complete -F _pw pw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,8 @@ Make sure you have rust / cargo / etc. installed. Then: | |
git clone [email protected]:ojensen5115/pw.git # Clone the repo | ||
cd pw # Enter the directory | ||
cargo install # Copy the binary to your local path | ||
cat bash_completion >> ~/.bash_completion # Set up bash completion | ||
source ~/.bash_completion # Get bash completion going in this shell | ||
``` | ||
## Data Storage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters