-
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 am currently learning the zsh and now I wanted to use strftime but i get:
zsh: command not found: strftime
I think I'm doin' something wrong, since I see people using that function all the time in their dotfiles.
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
SELECT rowid, Day, Advice from MainCategory where ((Day = ((cast(strftime('%d',date('now','-1 day')) as Integer)))) and (Month = (strftime('%m',date('now'))))) and ((Day = ((cast(strftime('%d',date('now')) as Integer)))) and (Month = (strftime('%m',date('now'))))) , ((Day = ((cast(strftime('%d',date('now'…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am trying to call Python's time.strftime() function using a Unicode format string:
u'%d\u200f/%m\u200f/%Y %H:%M:%S'
(\u200f is the "Right-To-Left Mark" (RLM).)
However, I am getting an exception that the RLM character cannot be encoded into ascii:
UnicodeEncodeError: 'ascii' codec can't…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am using the following to output the full name of a month in Greek.
setlocale(LC_TIME, 'el_GR');
strftime("%B");
This works, except the output string is ISO-8859-7 (greek code page), which is a problem since I need a UTF-8 string. I could put this through iconv to convert it, but I was wondering…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm using this line to get the beginning time of the first day of the month.
t = Time.now.to_date.beginning_of_month.beginning_of_day
When i display this using t.strftime("%A %b %e @ %l:%m %p")
it shows:
Monday Feb 1 @ 12:02 AM
The hour is always 12 (instead of 00), and more wierd the minute…
>>> More