help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-nano] Altering DOS/Mac/Unix terminated text files


From: Benno Schulenberg
Subject: Re: [Help-nano] Altering DOS/Mac/Unix terminated text files
Date: Tue, 24 Mar 2015 12:08:55 +0100

Hello Fergus,

On Tue, Mar 24, 2015, at 08:51, Fergus Daly wrote:
> Just started using nano 2.4.0. As with many previous versions
>       nano -help
> yields
>       -N    --noconvert    Don't convert files from DOS/Mac format
> carrying the implication that without the switch -N, files will be converted 
> to Unix format.
> But this is not what happens.
>       nano (no argument)
>       nano -N
> are identical: they don't convert.

Hmm...  If I use nano -N on a DOS file, then I see at the end
of each and every line a ^M.  Don't you see this?

Maybe the explanation of the option should be improved: it
doesn't convert the actual file, it just converts the internal
representation.

> If you go back far enough the following beautiful behaviour is what happened 
> with v.1.3.4:
>       nano (no argument) = if not Unix, convert convert to Unix
>       nano -D = if not DOS, convert to DOS
>       nano -M = if not Mac, convert to Mac
>       nano -N = do not change format
> PLEASE could nano v.current be made to mimic the marvellous behaviour of 
> 1.3.4?

I think that in general when one edits a file, one surely does
not want the editor to change the format of the file without
having explicitly asked it to do that.  Secondly I think it is
not an editor's task to convert formats -- sure, it would be
cool if it could do that, but it is an extra bell or whistle.  There
are tools like dos2unix or simple seds that can do that.

> Or, if not, how can I get
>       nano {? switch} = if not Unix, convert to Unix 

Benno

-- 
http://www.fastmail.com - Send your email first class




reply via email to

[Prev in Thread] Current Thread [Next in Thread]