?

Log in

No account? Create an account
It would be nice if CVS prompted before overwriting a large directory… - 'Twas brillig, and the slithy toves did gyre and gimble in the wabe [entries|archive|friends|userinfo]
Thomas

[ website | Beware the Jabberwock... ]
[ deviantArt | the-boggyb ]
[ FanFiction | Torkell ]
[ Tumblr | torkellr ]

Links
[Random links| BBC news | Vulture Central | Slashdot | Dangerous Prototypes | LWN | Raspberry Pi]
[Fellow blogs| a Half Empty Glass | the Broken Cube | The Music Jungle | Please remove your feet | A letter from home]
[Other haunts| Un4seen Developments | Jazz 2 Online | EmuTalk.net | Feng's shui]

[Thursday 24th July 2008 at 9:03 pm]
Thomas

boggyb
It would be nice if CVS prompted before overwriting a large directory tree with an older branch.

Scratch that, it would be nice if unix stuff in general prompted before doing file-trashing operations.
Link | Previous Entry | Share | Next Entry[ 5 pennies | Penny for your thoughts? ]

Comments:
[User Picture]From: tau_iota_mu_c
Thursday 24th July 2008 at 9:23 pm (UTC)
I hate cvs commit -m -- because if I accidentally hit the enter key instead of "'", then I end up committing the entire tree (often prematurely) with a bogus commit message.
(Reply) (Thread)
[User Picture]From: ralesk
Friday 25th July 2008 at 9:21 am (UTC)
Doesn’t having an EDITOR set help, like in SVN’s case? Then you don’t have to do -m at all, it’ll just pop up an editor with the default commit text.
(Reply) (Parent) (Thread)
[User Picture]From: tau_iota_mu_c
Saturday 26th July 2008 at 2:43 pm (UTC)
Hmmm. My editor is slightly heavy weight, and sometimes I want a really quick commit from the commandline (and besides, cvs commit by itself will still act as a wildcard - just hopefully you have an $EDITOR that doesn't trap SIGINT, so you can kill the cvs process).
(Reply) (Parent) (Thread)
[User Picture]From: ralesk
Friday 25th July 2008 at 9:28 am (UTC)
Many file-related tools have a -i option for interactivity, if I remember correctly. Would be nice if that was the default and you could turn it off for scripting (like “-y, assume yes for every question” or something).
(Reply) (Thread)
[User Picture]From: tau_iota_mu_c
Saturday 26th July 2008 at 2:47 pm (UTC)
Most linux people define aliases to mv/cp/rm -i. I find this dangerous. Log into a system that is not set up by you, type rm expecting confirmation, and oops, you just blew away *.

I prefer to define aliases called rmi/cpi/mvi, and my fingers tyop them instead. And on my own systems, rm/cp/mv became aliases that echoed "look, ya silly bugger. Use rmi". After a few months of that, now I type rmi without thinking. Scripts still found the real rm/cp/mv. If I logged into someone elses system, rmi would come back with "command not found". Then I would go back and edit the command to do rm -i. Failsafe. Not dependant upon quirky ways other people might set their machines up. Safe. I like safe.
(Reply) (Parent) (Thread)