What does SHOW ALL show? - oracle

What is the technical name for the variables shown by the SHOW ALL command in SQL*Plus? I want to know because the term "variable" is quite overloaded and I'd like to be specific.
Typing "help show" says :
SHOW
----
Shows the value of a SQL*Plus system variable, or the current
SQL*Plus environment. SHOW SGA requires a DBA privileged login.
...
Are ALL of the variables listed considered "SQL*Plus system variables"? I've seen some sources which refer to them as "SQL*Plus environment variables", others which call them "parameters".
Are some of them "system variables" while others are "environment variables"/"parameters", or are these terms interchangeable, or what?

According to Oracle:
Sho[w]
...
Shows the value of a SQL*Plus system variable...
Looking at the list, they are, in fact, all variables that are available only within SQL*Plus. It's not terribly surprising that you see them referred to in various forms, as most people will use the term that makes the most sense to them, rather than looking up the canonical term.
If you specify SHOW PARAMETERS instead, you get a list of initialization parameters, which are something else altogether.

Related

What does set -a "Mark variables which are modified or created for export" actually mean?

The help text for set -a is somewhat cryptic to me, but maybe i just don't understand what bash is doing behind the scenes with variables. Can someone explain why "marking" variables is needed (what are "unmarked" variables)?
My bash man-page uses a slightly different wording for this: Each variable or function that is created or modified is given the export attribute and marked for export to the environment of subsequent commands. This sounds more clear to me. It means:
Each variable you define in your script, is placed in the environment of any child process you create, and each function you define is also available to each bash-child-process you create.

LLDB : Tab completion after user defined aliases?

Uding lldb I defined the following alias : command alias bfn breakpoint set -n %1
Sadly, it does not allow Tab completion as the regular command does. It's a pity because all the time gained in typing the command is lost typing whole identifiers that are sometimes quite complex.
Nevertheless, buit-in aliases allow for completion so I am hoping there's a way to achieve the
same behaviour for user defined aliases.
Are you aware of any solutions to this problem ?
Thansk in advance.
It looks like the problem is with completion in option slots in aliases. The completions work for arguments. I think that’s what you are seeing, not that there’s different behaviors for “internal” and “user” aliases (there isn’t actually such a distinction)…
Every option has its own completer, and lldb isn’t figuring out which slot the positional argument resolves to before handling the completion.
Please file a bug about this with the bugs.llvm.org bug tracker. This should be possible, and would certainly be convenient.

Determine if bash/zsh/etc. is running under Midnight Commander

Simple question. I'd like to know how to tell whether the current shell is running as a mc subshell or not. If it is, I'd like to enter a degraded mode without some features mc can't handle.
In particular, I'd like this to
Be as portable as possible
Not rely on anything outside the shell and basic universal external commands.
Though it's not documented in the man page, a quick experiment shows that mc sets two environment variables: $MC_TMPDIR and $MC_SID. (It also sets $HISTCONTROL, but that's not specific to mc; it affects the behavior of bash, and could have been set by something other than mc.)
If you don't want to depend on undocumented features, you can always set an environment variable yourself. For example, in bash:
mc() { MC_IS_RUNNING=1 command mc "$#" ; }
Entering a "degraded mode" is another matter; I'm not sure how you'd do that. I don't know of any way in bash to disable specified features. You could disable selected built-in commands by defining functions that override them. What features do you have in mind?

How do I set Google login credentials as an environment variable (or "pass them to a method")?

The documentation for the roo library says that in order to use Google spreadsheets I need to
set the environment variables ‘GOOGLE_MAIL’ and ‘GOOGLE_PASSWORD’ or
you pass the Google-name and -password to the Google#new method.
I'm new to Ruby, naively just tried to change the environment variable (on Windows) by doing this in the system properties, but it seems that it's not environment variables in this sense (and I guess that'd be a bad way to store sensitive data anyway)
I've deleted the environment variables from my (user not system) settings again, so back to square one. How do I follow this instruction? I don't understand what it means by "pass the Google-name and Google-password to the Google#new method", I'm trying to run the line
oo = Roo::Google.new('"'+sheetfull'"')
and I could ask for the details in the program rather than changing system settings (to make it easier for other people to use my code) with something along these lines
puts "What's your email?"
GOOGLE_MAIL = gets
puts "What's your password?"
GOOGLE_PASSWORD = gets
so that these 'environment variables' are set up before the spreadsheet is called with oo, or else it results in an error.
I'm not quite sure how I'd tell it that they've been given though... I tried the code above but it's obviously initialising GOOGLE_MAIL and GOOGLE_PASSWORD as constants(?) that don't get "passed to any methods"
Sorry if I've worded this poorly, I'm still learning all the lingo! Feel free to call me out on any of the things I've named etc. etc.
You can set environment variables using the instructions here: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them
Alternatively, you can pass the values you prepared to roo like so:
Roo::Google.new(sheetfull, user: GOOGLE_MAIL, password: GOOGLE_PASSWORD)

Documenting bash functions

I would like to add documentation for bash functions so that users can lookup the functions with man. There should be no visible difference between my functions and actual commands.
I know I can do this by overriding man with a function that checks for my own functions. Is there another way?
If you have your man pages created (which is a task in itself) then what you can do is put them somewhere on the system like /usr/local/man (or wherever you like, really), then edit the system-wide $MANPATH variable to include that location. Then the man pages will be available.
Real shell functions are not documented by individual man pages but by the help builtin command. You would have to override that. But even I would not look there for information.
Just generate normal man pages and throw them into /usr/local/man/manX or /usr/local/share/man/manX - whatever your distribution already provides. Check /etc/manpath.config that this directory is already mentioned there. That way no one must fiddle in their startup files with the MANPATH environment variable.
Each manpage should also contain a clearly visible section explaining, that this is a function and not a command and what the difference is.
After that the social part kicks in: Tell everyone at every occasion about that documetation. By every I mean every, not only suitable. :-)

Resources