Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround found: Feature Request: Renaming a Secure Note or other item? #106

Closed
ghost opened this issue Aug 11, 2015 · 6 comments
Closed

Comments

@ghost
Copy link

ghost commented Aug 11, 2015

There doesn't appear to be any way for lpass to rename a Secure Note or other item?

Are there any plans for an "lpass rename" or "lpass mv" command in the near future, by any chance?

@ghost ghost changed the title Renaming a Secure Note or other item? Feature Request: Renaming a Secure Note or other item? Aug 11, 2015
@ghost ghost changed the title Feature Request: Renaming a Secure Note or other item? Workaround found: Feature Request: Renaming a Secure Note or other item? Aug 16, 2015
@ghost
Copy link
Author

ghost commented Aug 16, 2015

I figured out how to do a rename. The following renames an existing item from "old-name" to "new-name" ...

echo "new-name" | lpass edit --sync=now --non-interactive --name "old-name"

@bcopeland
Copy link
Contributor

I did just add a "lpass mv" -- but it only moves into folders instead of renaming leaf nodes, unlike the unix command of the same name. Perhaps it's not too late to make that one also support renaming. I'm a bit split on which is the least surprising mode of operation.

With the recent changes to edit, now you could also do "lpass edit old-name" and just change the "Name: old-name" line in your buffer.

@gunslingerfry
Copy link

@bcopeland : 'lpass edit old-name' and changing the Name field results in a change for website entries but does not result in a name change for secure notes. Is this expected or is this a regression?

@bcopeland
Copy link
Contributor

Yes, I think this is just a regular bug, but I'm not sure it ever worked for notes, so (maybe?) not a regression. I believe lpass mv should work in any case though.

@gunslingerfry
Copy link

Sorry to bug you again Bob, but I only see mv with the {UNIQUENAME|UNIQUEID} GROUP syntax. I tried mv old-name "group/new-name" but it just created "group/new-name" and moved it to that group.

@bcopeland
Copy link
Contributor

On Tue, Oct 04, 2016 at 09:43:28AM -0700, gunslingerfry wrote:

Sorry to bug you again Bob, but I only see mv with the {UNIQUENAME|UNIQUEID} GROUP syntax. I tried mv old-name "group/new-name" but it just created "group/new-name" and moved it to that group.

Oh, yeah, that's right. Darn. So, we should at least fix being able to
rename with edit.

From a quick look at the code, this might work for now?

    echo "newname" | lpass edit --name --non-interactive oldname

The problem looks to be that we collapse the edited fields back into the
original account but then disregard any edits made to non-note fields.
But there's a special case already for when just the name is edited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants