Comments (2)
Thought: Your disk layout is as follows
$ df -h /root
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 5G 2G 3G 60% /root
and you go ahead and as root
delete a postgres database with 20GB from /var/lib/postgresql/
.
This will fill up your /root/
partition to 100%. This needs to be taken into account when offering a feature like this.
from gdu.
What is needed to be done:
- create new enum
DeleteAction
of typeuint8
which will consist of items:ActionDelete
,ActionEmpty
andActionMoveToTrash
in packagetui
- modify
handleDelete
,confirmDeletion
anddeleteSelected
to acceptDeleteAction
instead of booleanshouldEmpty
- add new key-binding
D
(big letter d) totui/keys.go
which will callui.handleDelete(ActionMoveToTrash)
- add function
MoveItemToTrash
topkg/analyze/file.go
:- this function should create trash item according to the trash spec, so create a text file in
info
(e.g.~/.local/share/Trash/info
) and move the item intofiles
. - it should respect the setting of
XDG_DATA_HOME
env variable
- this function should create trash item according to the trash spec, so create a text file in
- add the new key-binding to help
- cover all the functionality by tests (every line, that could be tested, should be tested)
from gdu.
Related Issues (20)
- Consecutive mouse clicks may be mistaken as double clicks HOT 1
- gdu on Windows is not working HOT 3
- Sug: use more vert space for filename in scanning box HOT 5
- Doesn't read external config file (again) HOT 6
- Would you like to support negative sizes? HOT 1
- Feature: Show mtime by default, or command-line switch for it HOT 2
- Doesn't work when moving files to/usr/local/bin HOT 1
- Export with FullNames HOT 8
- apt outdated HOT 5
- [bug] Screen flicker HOT 12
- Introduce batch operations HOT 1
- Unable to send interactive gdu screen to background HOT 2
- Linux: I have issues with "Open file or directory in external Program" HOT 1
- Kali Linux - Compiled older version for repo HOT 2
- improvement of -n output HOT 4
- add support for following symlinks
- Scrolling while deletion dialog is displayed results in deletion of the wrong file
- -x doesn't seem to respect filesystem boundary on BTRFS
- Color themes HOT 1
- sorting non-interactive output with show-apparent-size
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdu.