# A 'pkg' Peculiarity



## puretone (Jan 31, 2017)

I don't know where else to place this post, other than it being a general thing and not really a bug per se. So here goes:

'Twas late a few nights ago and in semi-aware state I happened to stab my keyboard, incompletely as it turns out, with the keystrokes of "pkg upgrad". A rather bewildered version of myself ended up staring at the monitor with a great deal of "wtf shenanigans is this?!" for a good 10 minutes. I Googled with with all manner of quote-witchcraft in order to glean more information on how/who/when "pkg upgrad" became the defacto doppelganger of "pkg upgrade". Is there something in the manuals/handbook & this forum that I'm totally missing? Granted I've been lurking for decades, nearly, but this little tidbit is something I've not come across as far as FreeBSD is concerned. I can confirm its presence in FreeBSD 10.3 & 11.0, I suspect all 10.(n) versions will probably express it as well. Are the pkg devs having a bit of a laugh at our expense? Will the pkg command some random day suddenly complain how one's wife is sleeping with the neighbor(s)? Will ze Germans come 'round and complain how making fun of their accent when speaking English is "not funny"?

Whilst I'm nitpicking, and being overtly pedantic, why on earth has the capital letter "L" been completely disregarded at "login"? I realize that many of us semi & full-blown computer geeks have an affinity for lowercase *everything*, but in the interest of uniformity lets keep things tidy and have both "Login & Password" *or* "login & password" at the console. This business of "login & Password" just looks really out of place.


----------



## Tabs (Jan 31, 2017)

It looks like pkg will indeed take shortened arguments, so long as they are not ambiguous - https://github.com/freebsd/pkg/blob/master/src/main.c#L844


----------



## puretone (Feb 1, 2017)

It appears that I need to get used to scouring github more often for clues... thanks for the tip!

Now I'll start looking into this "login/Password" no-caps/caps spelling thing at console.


----------



## tobik@ (Feb 1, 2017)

puretone said:


> Now I'll start looking into this "login/Password" no-caps/caps spelling thing at console.


You know I've never noticed that before 

/usr/src/usr.bin/login.c has defines for that:

```
#define DEFAULT_PROMPT          "login: "
#define DEFAULT_PASSWD_PROMPT   "Password:"
```
So that seems to be deliberate. If you find out more please share!

You're supposed to be able to change the login prompt in /etc/login.conf by adding this to the default class:

```
:login_prompt=Login\c :\
```
(and the password prompt with passwd_prompt), but for some reason it only shows the updated prompt after a login failure.


----------

