Reputation
353
Top tag
Next privilege 500 Rep.
Access review queues
Badges
2 3 11
Impact
~41k people reached

  • 0 posts edited
  • 0 helpful flags
  • 29 votes cast
Jun
8
awarded  Nice Question
Jan
5
awarded  Famous Question
Feb
25
awarded  Famous Question
Jan
14
awarded  Nice Question
Dec
4
awarded  Commentator
Dec
4
comment How to add a command in /etc/rc.local file?
Thanks, never knew about sudoedit, that's a handy command, and definitely safer.
Nov
22
comment how to format the path in a zsh prompt?
OH! Now I see it. The whole thing is in PROMPT_COMMAND so that it gets rerun every time. Works great now. Although the thing I don't understand is that in my prompt I had a function parse_git_branch being called which updates fine, so I don't see why I can't insert a function to do the string replacement for the PWD.
Nov
22
comment how to format the path in a zsh prompt?
Actually, I'm trying to use your PS1 trick for Bash in my more complex prompt and it's not working, my PWD gets stuck again. But your snippet works as is. What's the purpose of PROMPT_COMMAND? This is what I've got: PS1="$(pwd)"; PS1="${debian_chroot:+($debian_chroot)}\[$bldgrn\]\u@$(fgcolor $hostnamecolor)\h$(resetcolor)\[$txtrst\]:\[$bldblu\]${PS1//\//$txtred/$bldblu}\‌​[\e[00m\]$bldred\$(parse_git_branch)\[$txtrst\] \[$undcyn\]\T \d\[$txtrst\] 95\$ " colors defined in github.com/ibrahima/dotfiles/blob/master/.bashrc.d/prompt.sh
Nov
22
comment how to format the path in a zsh prompt?
Any idea how to do this in Bash, or why it doesn't work in Bash? For me with Bash it just gets stuck at the first directory I start my terminal in, and doesn't update when I move around. I just took the $(pwd|grep --color=always /) and put that in my PS1 and got the strange behavior. Edit: OH! Didn't see the Bash section lol.
Nov
9
awarded  Notable Question
Aug
13
comment Using Ghostscript to convert multi-page PDF into single JPG?
Incidentally, I read elsewhere on SO that ImageMagick internally converts from PDF to PS and then PS to PNG when you invoke it this way, so that's another reason not to do it this way (two conversions=>lower quality and slower).
Feb
28
awarded  Popular Question
Nov
6
awarded  Yearling
Mar
29
awarded  Scholar
Mar
29
accepted Linux equivalent to robocopy?
Jan
5
awarded  Notable Question
Apr
13
awarded  Popular Question
Nov
4
awarded  Editor
Nov
4
revised Remove XP partition on Vista
Some clarifications and better formatting
Nov
3
answered Remove XP partition on Vista