-
as seen on Super User
- Search for 'Super User'
I'm a bash user willing to switch to a more friendly and advanced shell. I read a lot of good things about zsh, but I gave a quick test at fish and it seems great too.
Both seem very close in term of features, what is your opinion about those two shells especially as regards shell programming?
>>> More
-
as seen on Super User
- Search for 'Super User'
I have ZSH as default shell in MacOS, everything is working fine. ZSH is installed as brew package, Ive set default shell in my account, new shell is listed in /etc/shells... everything is set, like I've said.
I have some shell scripts in which I use some commands from zsh, like print. When I execute…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I run the following codes separately as my prompt unsuccessfully in .zshrc. This suggests me that apparently I do not have a program called __git_ps1. It is not in MacPorts.
#1
PROMPT="$(__git_ps1 " \[\033[1;32m\] (%s)\[\033[0m\]")\$"$
#2
PROMPT="$(__git_ps1 " (%s)")\$"$
#3
# Get the…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm a bash user willing to switch to a more friendly and advanced shell. I read a lot of good things about zsh, but I gave a quick test at fish and it seems great too.
Both seem very close in term of features, what is your opinion about those two shells ?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have "v" aliased to "vim */.cpp */.hpp */.cxx"
Problem is, if I'm in a directory without any .cxx files, zsh treats this as an error. Is there anyway to tell zsh to create the absence of */*.cxx files as "" instead of an error?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
i wonder if one should create a helper function in a class as a static function or just have it declared as a procedural function?
i tend to think that a static helper function is the right way to go cause then i can see what kind of helper function it is eg. Database::connect(), File::create().
what…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm looking at a member function
int funct(int x) const;
And I'm wondering if
static int funct(int x);
would be better.
If a member function doesn't use any of the member variables should it be static. Are there any things that would discourage this?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
We're currently converting a Delphi 2007 project to Delphi 2010. We were already using Unicode (via WideStrings and TNT Unicode Controls).
I was expecting to replace all Wide functions, e.g. WideUpperCase, with their equivalent, e.g. UpperCase, but they do not work the same way. For example, WideUpperCase…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I know this question might be frowned upon, but actionscript is a dynamic language similar to javascript and in javascript I can take an object from a library written by someone else and dynamically (at runtime) add/remove/modify functions, properties, prototypes etc. this is kind of like dynamically…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Sorry for long winded title, this makes a lot more sense with an example.
Suppose we have a class A:
class A {
public:
void someFunction();
void someOtherFunction();
};
And another class that privately inherits from A. However, we re-declare one of the inherited functions as…
>>> More