Adding some style guidelines for help on CLI commands
Pages: 1 2
Charles Ferguson (8243) 427 posts |
The question was whether anything existed. The problem was known, a solution was found, implemented and documented. If it’s not implemented in RISC OS 5, or you want to do it a different way, then that’s a different matter. But a solution exists, and has done for 15 years or so. |
David J. Ruck (33) 1635 posts |
A *Help . shows its only ever a few filing system commands which ever used the ~switch convention, everything else used old unix style single dash (abiguously for both single letters and words). Going with the newer GNU standard (single dash for single letter and multiple combinations, and double dash for words) is far more consistent, and what the vast majority of ported tooling is already using. Trying to insist on ~switch is not only living in the past, but in a past which didn’t acutally exist! |
Steve Pampling (1551) 8170 posts |
The question was whether anything existed. Agreed, totally. I’d also emphasise about not re-inventing the wheel. I also noted that it took you a little digging to find the info in a repository you knew should contain it. |
Martin Avison (27) 1494 posts |
And it looks a good way to resolve the problem. Just a shame that it has been so well hidden for so long! To save effort, avoid re-inventing the wheel, and to ensure compatibility it would seem to me an excellent small piece of design, documentation and code to share. I can but hope 2021 will be better in all sorts of ways! |
Rick Murray (539) 13840 posts |
Yes, albeit pretty terse.
Optional please. The use of double-dash may be common elsewhere but it isn’t RISC OS and it’s a pain to remember that “this tool does it properly while this tool does it the Linux way”.
Name some of them. Because they are all wrong. Page 598 (volume 2 p143) of the RISC OS 2 PRM clearly states (for OS_ReadArgs):
Which implies that even back in the RISC OS 2 days, it was seen as normal and correct to use a minus to introduce options and parameters. Evidenced by the fact that I’ve never come across any command that used a tilde on RISC OS other than the Copy/Count/Delete commands. Furthermore, the only references to the ‘~’ syntax in the current PRM is the documentation of those three commands in FileSwitch, backed up by the code in FileSwitch (…FileSys.s.FSCommands function SetAndGetUtilOption) being the only place that appears to deal with the ‘~’ negation. There’s nothing in the kernel sources that caters for ‘~’ in options.
Patently ridiculously wrong.
Indeed. I’ve just had a look at the Master Welcome manual, and the filesystem is way too simplistic (Copy and Delete, no Count) to take those sorts of options. I’m guessing that this might have been introduced with Arthur’s FileSwitch? Perhaps we just “think” that it’s something from the BBC MOS because it’s weird and non-standard. I also looked at the SJ MDFS manual in case it is something SJ did… but it doesn’t appear to be.
These appear to be tools that you alone have. It has always been common (and is even baked into a command in the OS to aid in parsing parameters) to use the -xxx syntax.
Indeed. <troll> So please let me be the first to propose that we standardise on the industry standard format of using |
Andreas Skyman (8677) 170 posts |
Now I think you’re being unnecessarily divisive! I also think |
Rick Murray (539) 13840 posts |
After 2020 we are obliged to support ~h, with ~ meaning “meh, whatever, I no longer care”. Oh, wait… hang on… then David wins. 🤦 😂 |
Steve Pampling (1551) 8170 posts |
The general advice is to type it out in a text editor, if you’re wound up then walk away and edit it when you come back. People tell me that a lot. |
Rick Murray (539) 13840 posts |
It’s not that your monitor doesn’t exist, it’s that either your browser or this site is not behaving entirely correctly and is allowing the content to expand up to sort of fill a FullHD display, but not shrink down enough to be readable on an 800×600 display.
Check your wording and interpretation carefully. I didn’t say non-existent. I said wrong. Not the same thing. And, on the topic of the monitor (from the other thread): (you) Try 800 h res or less. Which was not what he was implying. He was suggesting that 800px width was a screen resolution that suits the likes of Windows95… it does exist, but it isn’t something that would be commonplace enough to bother about these days. Consider the six LCD panels I look at the most:
I simply wouldn’t look at anything smaller than 1024×600. The point is, you’re being robbed if you’re paying more than a tenner for a new screen with a resolution of 800×600 or less. Yes, I know people are still selling them, but if you look around you should be able to find a better resolution in the same size factor for about the same price. But, I understand it can be hard. Prices are all over the place and everybody lies. I’m looking at a monitor with a stand. The desription says it’s a 7" screen for a car, Pi, video surveillance, etc. HDMI + VGA + AV input. 1920×1080 pixels. Not bad for €61,20 (though not Prime so I wouldn’t touch it because non-Amazon returns can be a nightmare). It’s only when digging around in the description that it mentions, almost in passing, that it is a 1024×600 display. Sure, it can probably accept FullHD HDMI input (like my 7" screen can). But that’s not the native screen resolution. At any rate, you ought to at least be aiming for a 1024×600 at the minimum. And if you can pick up a little HDMI to VGA adaptor (preferably a powered one, not one that leaches off the HDMI’s 5V) than it will open up the ability to pick up a used LCD panel of a normal size. I get them from rummage/yard sales. Because these things are VGA and stuff these days expects HDMI, so they’re no longer wanted. No need to suffer 800×600! |
Clive Semmens (2335) 3276 posts |
I don’t think so. Apps that are expected to be used on low-end smart phones, perhaps. I’ve just finished making my website responsive to cope with phones and tablets – first time I’ve taken an interest in resolutions below 1280×768. There are a few diagrams that you have to scroll left-and-right as well as up-and-down on lower resolutions, but most pages work okay on small screens now. |
Rick Murray (539) 13840 posts |
You do understand, I hope, that a lot of our documentation is decades out of date? Additionally, just because a guideline says something doesn’t mean it’ll be implemented. In case you hadn’t noticed, NetSurf handles it’s own copy-paste within itself in a manner akin to Windows.
I’ve handled this in my blog by having the page content be fairly generic HTML, with a php setup that sniffs the browser platform and supplies a different header and footer if it’s a mobile device, and also replaces the images with a proglet that reduces their size and quality so you’ll get a fairly small low res image on mobile (remember, this was originally done when typical mobile data allowances were hundreds of megabytes per month and a lot of places still only had 2G). It isn’t a case of element hiding, the mobile version doesn’t just hide the right panel with the calendar and links, it simply isn’t provided at all – all to try to reduce data consumption. There’s a “Desktop version” link if you want the full version, and it’s passed back as a parameter ( &keitai=0 ) so it ought to stick. I’m specifically not using cookies, because, complications.
;-) For me it’s not so much the screen size, it’s the page complexity. That’s why it’s a weird mishmash of HTML 3.2 era markup with some CSS bolted on 1. Back in the early days, working with Fresco was one of the tests I’d give it. Basically, I want it to look more or less correct on an older browser. You’ll notice most modern sites look terrible without the styling as something along the way everybody adopted the idea of using CSS to control how it displays with the markup being just basic markup. That’s good if you know all your readers have a browser capable. I, potentially with people using the likes of Fresco and Oregano, can’t guarantee that. 1 Don’t complain – a few years back my design changes were tested on NetSurf, Fresco (under emulation), MSIE8, Opera (on Android and XP), Firefox (on Android and XP), Safari (iOS 7), Chrome (Android), and the Android stock browser. |
Paolo Fabio Zaino (28) 1882 posts |
@ Charles
Thanks, so had a look at Select and found that it seems that what you’re referring to is the addition of a help text file in !Boot.Library.Help where the help file name is the name of the command and the syntax is a tabbed syntax. Is that what you’re referring to?
Yup and that’s what we should standardise as well, if it wasn’t clear from my first post then apologies. I guess now it’s very clear that the nature of my question is for external commands only and for their own help, if in doubt please ask :)
AFAIR yes for the CLI (although the support was basic). |
Clive Semmens (2335) 3276 posts |
Ah, okay. And when were those RISCOS guidelines written? And when last updated? I was running an office full of RiscPCs – and before that, A5000s and A540s – in the 1990s. We were using 1600×1200 monitors, but we also had an A4 portable computer. I don’t remember what the resolution of that was, and it only had 16 shades of grey. Admittedly 1600×1200 was cutting edge at that time. But that was a quarter of a century ago.
Some of you might be. Low power, yes, ideally, but I also consider my eyes, and how effectively I can work. |
Steve Pampling (1551) 8170 posts |
Standardisation means the same across the board, so I’d expect the internals to be matching the standard as well. but the standard interface to get help on the commands has existed since the BBC (yeah, I’m pretty sure that the BBC was the first system to offer the extensions to the help interface through the service system). Well, the GUI on the Beeb was lacking quite a lot. :) |
Paolo Fabio Zaino (28) 1882 posts |
@ Steve Pampling
Sure when this is actually feasible obviously, right? ;) Just as a note: The C parser I wrote can process also internal parameters same way for module’s commands as for external command tools (details on last post on page 1 of this thread). Anyway I’d wait for Charles response on my finding on Select, because I ran some tests and my findings doesn’t seems to have found a proper standardisation here:
So, if that’s the standardised way then we should review it a bit me thinks… With that said, it does kinda do what people have requested on here which is have the form of:
I personally like it, but it appears to need improvements (AFAICT). Hope this helps understanding my point a bit more.
LOL of course! My point was more about other platforms that did present some help messages in their GUIs although if at the time every native help support was pretty basic :D |
Steve Pampling (1551) 8170 posts |
Yup. |
Pages: 1 2