adrianlopezroche / fdupes

FDUPES is a program for identifying or deleting duplicate files residing within specified directories.
2.43k stars 187 forks source link

delete key doesn't work in interactive mode on OSX #137

Closed karloskalcium closed 4 years ago

karloskalcium commented 4 years ago

I have Macbook pro 13", running OSX 10.14.6, and when running the latest fdupes, I am unable to delete in interactive mode.

The delete key doesn't seem to be recognized - neither while typing a command, or at the end once I'm done selecting things to delete. typing 'delete' doesn't seem to work either.

jbruchon commented 4 years ago

You don't use the literal delete key. You type a comma-separated list of numbers corresponding to which files in each set you DON'T want to delete. For example, if three files are shown as matched, you can delete the second file and keep the first and third files by typing 1,3 and hitting enter.

karloskalcium commented 4 years ago

per the man file, you do indeed need to use the delete key. you may be speaking about the old/plain interface - which still works - I'm here talking about the interactive interface. When in that flow, on osx, the delete key doesn't work, and I can't seem to find way to make it delete the files I selected.

DELETING DUPLICATES
       Once they've been tagged for deletion, files can be deleted by pressing DELETE.  Fdupes  will  delete
       any files that are tagged for deletion and delist any sets whose remaining files have been tagged for
       keeping. For safety, fdupes will refuse to act on sets for which all files have been tagged for dele-
       tion. To handle these cases, tag at least one file for keeping and run the delete command again.
jbruchon commented 4 years ago

Oh, I thought you meant the interactive deletion mode from the command line, not the ncurses interface. Never mind, sorry!

adrianlopezroche commented 4 years ago

I dont' have a Mac to test on, but it seems from your description that fdupes isn't receiving the expected character (KEY_DC) when you press delete. It looks like Macs don't have a delete key as such, but rather a backspace key that's labeled "delete" for some reason.

I should add a proper delete command to complement the delete key, but in the meantime I've read you can simulate a proper delete key on a Mac by using either Fn + Delete or Control + D.

yaseenkadir commented 4 years ago

I ran into the same issue and stumbled onto this thread. It's Fn + Shift + Delete on mac.

CoderJamie commented 4 years ago

Another related issue with Mac is that you also can't use the DELETE key to backspace over a typo.

adrianlopezroche commented 4 years ago

Fixed by 52e2a942c51194f612a2bd7bc6af1982d932151e (add "prune" command as synonym for DELETE key).