VOGONS

Common searches


First post, by Exploit

User metadata
Rank Newbie
Rank
Newbie

I want have for DR DOS for the program "pico" an alias called "nano".

In FreeDOS i can put the following line into the fdauto.bat (autoexec.bat equivalent) and thus have an alias of pico, called nano:

alias nano pico

See also here:
http://wiki.freedos.org/wiki/index.php/Alias

But in DR DOS, especially DR DOS 3.41 that i use, there is no alias command. At least not that i know of. Is there a different command that does have the same effect? Or are aliases usually not supported in DR DOS and MS DOS?
Is FreeDOS the only DOS that supports aliases?

Reply 2 of 18, by BitWrangler

User metadata
Rank l33t
Rank
l33t

Ima sound like a parrot here because Mr Slug beat me, this line an edit after it warned me of new reply on posting.

You could just stick a pico.bat file in the dos path somewhere that runs nano.

I recall there being some other way to do it on MSDOS 6 and higher, but DR DOS 3.41 was pretty primitive IIRC, only around MSDOS 3.3 sophistication.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 4 of 18, by Exploit

User metadata
Rank Newbie
Rank
Newbie
mR_Slug wrote on 2022-06-27, 13:12:

You could just copy nano and rename nano to pico.

Thanks, that might be the most simple solution. Didn't thought of that.

Dos does not generally have aliases.

Thanks for answering that. So FreeDOS seems to be the only DOS version that does support aliases.

Reply 5 of 18, by leonardo

User metadata
Rank Member
Rank
Member

To complement the prior responses with a bit more detail, place nano.bat in your path, such as C:\DOS.

The file could contain the following lines:

@echo off
pico %1

The above will result in someone typing nano autoexec.bat being executed as pico autoexec.bat.

If pico accepts more parameters or switches, you would want to append %2, %3, etc. for each possible parameter. I'm going off MS-DOS knowledge here, hopefully this is applicable to DR-DOS too.

[Install Win95 like you were born in 1985!] on systems like this or this.

Reply 6 of 18, by Exploit

User metadata
Rank Newbie
Rank
Newbie
leonardo wrote on 2022-06-27, 13:53:
To complement the prior responses with a bit more detail, place nano.bat in your path, such as C:\DOS. […]
Show full quote

To complement the prior responses with a bit more detail, place nano.bat in your path, such as C:\DOS.

The file could contain the following lines:

@echo off
pico %1

The above will result in someone typing nano autoexec.bat being executed as pico autoexec.bat.

If pico accepts more parameters or switches, you would want to append %2, %3, etc. for each possible parameter. I'm going off MS-DOS knowledge here, hopefully this is applicable to DR-DOS too.

Thanks, that works like a charm.

Reply 8 of 18, by Exploit

User metadata
Rank Newbie
Rank
Newbie

BTW, the pico version shipped with FreeDOS 1.3 does still use UNIX style line ending (Line Feed = LF).
It's possible to compile the DOS port of pico in a way to use CR LF (Carriage Return + Line Feed) line ending, but the version shipped with FreeDOS isn't compiled with that option and there is no option or parameter to change that behavior on run-time.

This results into a not working Batch file, if you edit a *.bat Batch file with pico. This can be checked with a hex editor.
If you try to run a Batch file with only LF line ending then the following DOS Versions won't be able to run the batch file correctly:
DR DOS // Last version tested 6.0
MS-DOS // Last version tested 6.22 and 7.x from Windows 95
IBM-DOS // Last version tested 7.0

The only DOS version that can run BATCH files with Unix style line ending and doesn't care if it is CRLF or LF is FreeDOS.

For me that means, that i won't use pico for editing files in DOS anymore.
I put a -v in my nano.bat file after the pico command, which leads into opening the files read only.
I also added an ECHO command with a message, in the case i have to remember it.

Reply 9 of 18, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Exploit wrote on 2022-06-27, 16:28:

The only DOS version that can run BATCH files with Unix style line ending and doesn't care if it is CRLF or LF is FreeDOS.

I'm speaking under correction, but I think that depends on the Command Line Interpreter ("command.com") mainly.

That's the one who processes user inputs, command line parameters, batch files etc.
In case of FreeDOS, that's FreeCOM, I believe.

Principally, it's possible to switch the CLI on most DOSes.
That's why 4DOS was possible, I think.
https://en.wikipedia.org/wiki/4DOS

So maybe it's possible to just use a different CLI on MS-DOS, DR DOS etc? 🤷‍♂️

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 10 of 18, by Gmlb256

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2022-06-27, 16:50:

Principally, it's possible to switch the CLI on most DOSes.
That's why 4DOS was possible, I think.
https://en.wikipedia.org/wiki/4DOS

That's what I posted but somehow the OP overlooked it. 😐

Gmlb256 wrote on 2022-06-27, 13:29:

Simply install 4DOS command line shell. It can be downloaded here: https://www.4dos.info/v4dos.htm#751

4DOS supports the ALIAS command.

Reply 11 of 18, by Exploit

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2022-06-27, 16:50:
Exploit wrote on 2022-06-27, 16:28:

The only DOS version that can run BATCH files with Unix style line ending and doesn't care if it is CRLF or LF is FreeDOS.

I'm speaking under correction, but I think that depends on the Command Line Interpreter ("command.com") mainly.

That might be possible.

I am usually using the CLI that is shipped with the DOS Version.

Reply 12 of 18, by Exploit

User metadata
Rank Newbie
Rank
Newbie
Gmlb256 wrote on 2022-06-27, 16:53:
Jo22 wrote on 2022-06-27, 16:50:

Principally, it's possible to switch the CLI on most DOSes.
That's why 4DOS was possible, I think.
https://en.wikipedia.org/wiki/4DOS

That's what I posted but somehow the OP overlooked it. 😐

I have read your comment. But the other solution worked too and i didn't want to install a 3rd party CLI.
And if i did, i would probably select FreeCOM from FreeDOS.

Reply 13 of 18, by jakethompson1

User metadata
Rank Oldbie
Rank
Oldbie
Exploit wrote on 2022-06-27, 17:08:

That might be possible.

I am usually using the CLI that is shipped with the DOS Version.

Don't know about DR-DOS, but as far as MS-DOS.
Are you not using DOSKEY already? That's what gives you arrow key functionality and command history at the command line. It can also do macros. e.g. doskey nano=pico, or doskey ls=dir /w
The macro facility is more complicated and can handle arguments and things. see HELP DOSKEY "Notes" page on MS-DOS 6.22 for details.

Reply 15 of 18, by mpg9999

User metadata
Rank Newbie
Rank
Newbie
leonardo wrote on 2022-06-27, 13:53:

To complement the prior responses with a bit more detail, place nano.bat in your path, such as C:\DOS.

Extending this further, you could also create a dir C:\DOS\ALIASES, add it to path, and put a bunch of batch files in there as aliases in there for a tidy setup

Reply 16 of 18, by moog

User metadata
Rank Newbie
Rank
Newbie
Exploit wrote on 2022-06-27, 16:28:
BTW, the pico version shipped with FreeDOS 1.3 does still use UNIX style line ending (Line Feed = LF). It's possible to compile […]
Show full quote

BTW, the pico version shipped with FreeDOS 1.3 does still use UNIX style line ending (Line Feed = LF).
It's possible to compile the DOS port of pico in a way to use CR LF (Carriage Return + Line Feed) line ending, but the version shipped with FreeDOS isn't compiled with that option and there is no option or parameter to change that behavior on run-time.

This results into a not working Batch file, if you edit a *.bat Batch file with pico. This can be checked with a hex editor.
If you try to run a Batch file with only LF line ending then the following DOS Versions won't be able to run the batch file correctly:
DR DOS // Last version tested 6.0
MS-DOS // Last version tested 6.22 and 7.x from Windows 95
IBM-DOS // Last version tested 7.0

The only DOS version that can run BATCH files with Unix style line ending and doesn't care if it is CRLF or LF is FreeDOS.

For me that means, that i won't use pico for editing files in DOS anymore.
I put a -v in my nano.bat file after the pico command, which leads into opening the files read only.
I also added an ECHO command with a message, in the case i have to remember it.

If your DOS has tr, you can change all instances of \n into \r\n. Althought I would gladly enforce \n everywhere. \r is for typewriters, not for computers.

Audigy 2 ZS in FreeDOS
LinLin adapter documentation
+ various capacitor list threads

Reply 17 of 18, by oso2k

User metadata
Rank Newbie
Rank
Newbie

I was the first to suggest an `alias` command in FreeDOS over 20 years ago (https://marc.info/?l=freedos-dev&m=90221491027840&w=2). It was implemented shortly there after.

As with 4DOS, you can install FreeDOS Command.com and get alias functionality that way too.

Reply 18 of 18, by BitWrangler

User metadata
Rank l33t
Rank
l33t

*waves hand up and down* stand under this if you want a pat on the head, I can't reach 😁

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.