Tuesday, December 30, 2008

The Command Line

It's only scary because we make it scary. It's the most powerful interface we currently have with our machines, the predecessor of the phonetic shell, of voice controlled interfaces.

It doesn't have to be. It shouldn't be.
I love the command line, but frick, do I hate unix.

Don't get me wrong. POSIX is great. It's on my list of requisites for operating system consideration-- but why in hades do END USERS _ever_ get exposed to it?

An online acquaintance of mine from Argentina made a nice little 'urip' utility that turns youtube links into audio files on your desktop. I'm his primary tester, and today we talked a little about command line arguments. An excerpt:

leo_rockway: I could check if the non regex matching "thing" is either -g or --ogg
ethan: what does -g do?
leo_rockway: converts to ogg/vorbis
ethan: ....
leo_rockway: didn't you just read the help?
ethan: but that's what --ogg does
leo_rockway: that's the long argument
ethan: is that how it's done?
leo_rockway: there's always a short and a long argument
leo_rockway: yup
leo_rockway: just man any command and you'll see
leo_rockway: man ls
leo_rockway: -a, --all
leo_rockway: do not ignore entries starting with .
ethan: funny thing there....
ethan: you know what
ethan: if you're going to bother with human readable arguments
ethan: drop the silly --
ethan: -a, all
ethan: list all
ethan: ls -a
leo_rockway: *shrug*
ethan: start a new, more efficient convention, if you can
ethan: urip ogg $URL
ethan: can it be done?
leo_rockway: yes it can
ethan: :)
ethan: think of the usability
ethan: ;)
ethan: when I'm giving my mom instructions over the phone....
ethan: 'install urip'
ethan: 'urip ogg $URL'
ethan: 'sudo apt dash get install urip'
ethan: 'urip dash dash ogg $URL'
leo_rockway: kill dash nine!
ethan: 'murder firefox'

Another excerpt, this time from my ~/.bashrc:

# system command aliases
alias list='ls'
alias delete='rm'
alias DELETE='sudo rm'
alias frigging='sudo'
alias install='sudo apt-get install'
alias uninstall='sudo apt-get remove'
alias check-update='sudo apt-get update'
alias update='sudo apt-get upgrade'
alias murder='sudo killall'
alias get='wget'
alias GET='sudo wget'
alias enter='cd'
alias up='cd ..'
alias home='cd ~/'
alias unmount='umount'

function remove () { mv "$@" ~/.local/share/Trash/files; }
function REMOVE () { sudo mv "$@" ~/.local/share/Trash/files; }

Ubuntu may want to be linux for human beings, but I don't know what everybody else is doing. I don't think we can stay on the same path and accomplish what we're setting out to do.
The command line is a cryptic disgrace because we seem content to leave it that way. Fixing this may require patching just about every application in the Ubuntu operating system, but hey, if it can't do that, what is bzr for again?

1 comment:

L. said...

Hey, I think this is a pretty good idea actually!

lol @ SHOUTING for sudo commands :p