The Linux command line sucks
-
How the fuck does a tool as simple as
less
not have the ability to wrap searches around to the top of the file you're searching?
-
@bb36e said in The Linux command line sucks:
How the fuck does a tool as simple as
less
not have the ability to wrap searches around to the top of the file you're searching?Because it's too simple. You need a more complicated tool for that, obs.
-
@bb36e said in The Linux command line sucks:
How the fuck does a tool as simple as
less
not have the ability to wrap searches around to the top of the file you're searching?Even Notepad can do that, as of the next update at least
-
@bb36e said in The Linux command line sucks:
How the fuck does a tool as simple as
less
not have the ability to wrap searches around to the top of the file you're searching?Because it would break backwards compatibility. I'm sure there's at least one build server somewhere that relies on
less
never wrapping around. Yes, I do realizeless
is an interactive-only tool that's almost unusable programatically.
-
@bb36e said in The Linux command line sucks:
How the fuck does a tool as simple as
less
not have the ability to wrap searches around to the top of the file you're searching??
If someone who could add that feature missed it enough to add something like$LESSSEARCHWRAP
, it would probably be easy to get a pull request in.
-
@bb36e said in The Linux command line sucks:
How the fuck does a tool as simple as
less
not have the ability to wrap searches around to the top of the file you're searching?It has the much more useful ability to search forward (or backward) across a whole collection of files.
-
@Gąska said in The Linux command line sucks:
less
is an interactive-only tool that's almost unusable programatically.Really?
tell application "System Events" tell application process "Terminal" set frontmost to true keystroke "less /var/log/system.log" & return keystroke "/last message repeated" & return repeat 10 times keystroke (some item of {"n", "g"}) delay 1 end repeat keystroke "q" end tell end tell
-
@Gurth I don't recognize this syntax. I conclude that it's best for my sanity if I don't engage with you in this conversation.
-
@Gąska APPLESCRIPT
-
This post is deleted!
-
-
@PleegWat I have used AppleScript once. AppleScript has the nice "feature" of being language-dependant. So a script written for english macOS would probably not work in swedish macOS because the programs and buttons and such have different names.
-
@PleegWat said in The Linux command line sucks:
@bb36e said in The Linux command line sucks:
@Gąska APPLESCRIPT
May God have mercy upon your soul.
Thou mayest call Him by the name of Steve, and yes, He is merciful and user-friendly.
@Atazhaia said in The Linux command line sucks:
@PleegWat I have used AppleScript once. AppleScript has the nice "feature" of being language-dependant. So a script written for english macOS would probably not work in swedish macOS because the programs and buttons and such have different names.
So that's where MS got that brillant idea for VBA from
-
@Atazhaia said in The Linux command line sucks:
@PleegWat I have used AppleScript once. AppleScript has the nice "feature" of being language-dependant. So a script written for english macOS would probably not work in swedish macOS because the programs and buttons and such have different names.
Back in the day my favorite way AppleScript would break is due to the length of the object references and command options. People would post the text of scripts on our mailing list, but thanks to long, long lines you'd have to spend all sorts of time unraveling the text to recreate the original script. Newbies constantly had problems with this as they didn't know what it was supposed to say.
-
@Atazhaia said in The Linux command line sucks:
AppleScript has the nice "feature" of being language-dependant. So a script written for english macOS would probably not work in swedish macOS because the programs and buttons and such have different names.
Only if you’re directly referring to things with text on them by that text.
menu bar item "File"
for example only works if there is actually such a thing, not if it has a localised name. This can be avoided by referring by number, likemenu bar item 1
for instance. I agree that this is a lot less clear when you read it back.
-
@Atazhaia said in The Linux command line sucks:
a script written for english macOS would probably not work in swedish macOS because the programs and buttons and such have different names
There's not a nice way around this. You either use labels (which aren't stable between users' languages) or you use identifiers of some sort (which are largely undiscoverable). I guess you could use some sort of inspection tool to take the names and bind them to identifiers at script creation time, but that's annoyingly difficult to do in many cases. (Also, all this Applescript stuff totally relies on being able to talk in the MOP of Objective-C/Swift so that's highly limiting on developers. And ewwww…)
-
@PleegWat vim does not always need to load the whole file. less is sometimes symlinked to
vim -R
.
-
@TheCPUWizard said in The Linux command line sucks:
tom@muon:~$ hammer
hammer: command not found
tom@muon:~$ wrench
wrench: command not found
tom@muon:~$ screwdriver
screwdriver: command not found
tom@muon:~$ tweezers
tweezers: command not found
Obviously your system administrator doesn't trust you using such powerful tools and has removed access to them for your account. :)Just use
php
, it’s the Omni tool.