[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What's your $PS1?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 47
Thread images: 9

File: c.jpg (34KB, 1024x768px) Image search: [Google]
c.jpg
34KB, 1024x768px
What's your $PS1?
>>
File: prompty.webm (94KB, 640x332px) Image search: [Google]
prompty.webm
94KB, 640x332px
function definePrompt() {
if [[ `uname` =~ Darwin ]];
then
if [[ `scutil --get ComputerName` =~ hck ]];
then
echo "hck";
else
echo "mbp";
fi
else
echo "tor";
fi
}
PS1="%* @ $(definePrompt) %~ $ ";
TMOUT=1
TRAPALRM() { zle reset-prompt }

has the following effect so i know when i actually ran the last command (because the timestamp stops updating when i hit enter)
>>
>>57170966
>local wintoddler discovers PS1
>>
File: PSX-Console-wController.jpg (2MB, 4140x1900px) Image search: [Google]
PSX-Console-wController.jpg
2MB, 4140x1900px
>>
>>
powerline-shell.py

Looks amazing, I wish it wasn't so heavy though
>>
export PS1=" "
>>
export PS1="$ "

or for root

export PS1="# "

fuck this hipster powerline faggotry
>>
"\w \n \u >"
Just break the line after directory
>>
>>57171523

muh man
>>
u0_a56@h60_l01:/ $ echo $PS1
$(precmd)$USER@$HOSTNAME:${PWD:-?} $
>>
File: thistbhfam.gif (161KB, 921x155px) Image search: [Google]
thistbhfam.gif
161KB, 921x155px
>>57171523
>>
>>57171523
Only right answer

/thread
>>
[\u@\h \W]\$


the standard arch one
>>
>>57171523
>not "8==> "
>>
>he still uses PS1
>>
>>57171202
zsh theme?
>>
>>57171202
what terminal is that?
>>
RED="\[$(tput setaf 9)\]"
RESET="\[$(tput sgr0)\]"

export PS1="${RED}\A \W ${RESET}"
>>
>>57171202
Consider suicide.
>>
>>57171114
What's wrong with being a "toddler'? My daughter just discovered Star Wars last week. She's 5. Am I supposed to ridicule her for not knowing about Star Wars sooner? "I've been watching this movie so long I'm sick of it," I told her. "Are you some sort of 'toddler'? This movie has been out for like four decades already." Am I supposed to chastise her for not knowing the name of the Millennium Falcon, which she just called a "space ship"? "You don't even know what a millennium is, do you? You must be a 'toddler'! Learn some words and then get back to me."

Every single one of us is at a different stage in life with different experiences. I don't see any value in pointing out that some of us are just learning what others of us already know unless you want to help share your experience. Taking a condescending attitude--on an anonymous image board of all places--only shows you have a long way to go on your personal journey to maturity. I hope the best for you in the future.
>>
>>57172919
>2011+5
>being a father
You've messed up somewhere in your life, jiji-san. But congrats on being able to give the """ gift""" of life to your precious loli.

>>57170966
Robby Russel, standard option in both ZSH and Fish.
>>
>>57172962
Cynicism is a defense mechanism, but it's not very effective in the long term, which you'll eventually discover.
>>
>>57170966
export PS1='\[\e[1;32m\]\$\[\e[0m\] '
>>
%{$fg[blue]%}%~ $(git_prompt_info)$(bzr_prompt_info)[%n@%m] [%*]%{$reset_color%} $(emoji-clock)
%{$fg_bold[black]%}>%{$reset_color%}
>>
>>57170966
\[\033[0;37m\][\[\033[1;34m\]\u\[\033[0;37m\]@\[\033[1;34m\]\h \[\033[1;37m\]\W\[\033[0;37m\]]\[\033[0;37m\]$ \[\033[0m\]
>>
>>57171523
It should be
export PS1='\$' # Notice the backslash, and the single quotes

From the bash man page:
\$     if the effective UID is 0, a #, otherwise a $
[\code]
>>
From my ~/.bashrc:
# PS1

# $ps1_color0: The default color
ps1_color0='\033[0m'
# Default (no color)

# $ps1_color1: The color of the username (\u) and the hostname (\h)
ps1_color1='\033[1;34m'
# Light Blue

# ps1_color2: The color of the delimiting characters in the PS1,
# namely: '[', '@', ']' and '$'
ps1_color2='\033[0;37m'
# Light gray

# ps1_color3: The color of the current working directory (PWD)
ps1_color3='\033[1;37m'
# White

PS1="\[$ps1_color2\][\[$ps1_color1\]\u\[$ps1_color2\]@\[$ps1_color1\]\h \[$ps1_color3\]\W\[$ps1_color2\]]\[$ps1_color2\]$ \[$ps1_color0\]"
export PS1

unset ps1_color{0..3}
>>
>>57170966
##### PS1
# We need this to dynamically add user to prompt
setopt PROMPT_SUBST
PS1='}$([ "$USER" != "me" ] && echo $USER)'
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
PS1="}%n@%M"
else
case $(ps -o comm= -p $PPID) in
sshd|*/sshd) PS1="}%n@%M" ;;
esac
fi
export PS1="$PS1%~{"

##### VI MODE
bindkey -v
# Color PS1
export KEYTIMEOUT=1
export _PS1="$PS1"
precmd() {
PS1="%{[38;05;4m%}$_PS1%{[0m%}"
}
zle-keymap-select() {
if [[ "$KEYMAP" = "vicmd" ]] ; then
PS1="%{[38;05;2m%}$_PS1%{[0m%}"
else
PS1="%{[38;05;4m%}$_PS1%{[0m%}"
fi
() { return $__prompt_status }
zle reset-prompt
}
zle-line-init() {
typeset -g __prompt_status="$?"
}
zle -N zle-keymap-select
zle -N zle-line-init

I need all that shit because I use vi keybindings and I want the color of my
prompt to change depending on the mode I'm in (normal or insert).
>>
File: 22121.png (15KB, 333x442px) Image search: [Google]
22121.png
15KB, 333x442px
>>57172919
>>
[\h:\w] \u% 
>>
>>57172919

Excuse me, but you are too reasonable, well spoken, and responsible for this site. You didn't even call anyone a fag or cuck in your post. I think you would be happier and your time would be spent more productively on some other site. Perhaps try https://www.reddit.com/. This board is mainly for denigrating others' choice in cellular phones, computers, and operating systems, and also manipulating visitors into providing free, substandard tech support. I really feel you are too intelligent to profit from any time spent here. Thanks for existing, and best of luck in your future endeavors.
>>
user@host:~>
Coloured background, black text. Makes it easier to find in scrollback while debugging etc.
>>
>>57173553
Basically this, I pretty much only need to know if i'm in an SSH session and if I am then set the hostname in.
>>
>>
>>57170966

Red explanation mark is to remind me it's my NAS and I shouldn't reboot while gf is watching Gilmore girls.
>>
>>57172592
iterm2 borderless
>>57172711
n-no bully
>>
>>57176562
>iterm2
mac faggot
>>
>>57176603
i use macOS but im a lesbian (。>﹏<。)
>>
>>57176607
so a tranny that likes grils?
>>
>>57176603
Literally nothing wrong with using OS X.
>>
>>57176636
no... (^_−)−
>>
>>57176603
What? Couldn't you recognize it was iterm2 at the first glance?
>>
>>57174751
Off to Reddit with you.
>>
>>57172711
i do every day
>>
>>57171202
>imgcat
So can this concatenate two images together? or is this some neo-unix user thing that has no idea what the original cat utility is used?
>>
><(((">
Thread posts: 47
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.