summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-21Add public repository fluffKévin Le Gouguec
2018-01-21Set PS2 to "… "Kévin Le Gouguec
Because I'm a Unicode hipster. Also move the "dumb" check below function definitions, so that maybe someday I can try to play with those functions in shell-mode.
2017-10-30Shorten prompt for M-x shellKévin Le Gouguec
2017-10-30Stop exporting PROMPT_COMMANDKévin Le Gouguec
Otherwise Emacs picks it up when started from a terminal, defeating my attempt to shield M-x shell from my weird-ass prompt.
2017-03-07(m) Simplify code and tweak whitespaceKévin Le Gouguec
2017-03-02Change no-newline and rule charactersKévin Le Gouguec
I've seen the prohibited sign elsewhere before (on Github IIRC), I find it neat. Using the box drawing rather than the long dash ensures the line looks continuous even in TTYs.
2017-03-02Move horizontal rule out of promptKévin Le Gouguec
Simplifies the code somewhat; less arguments to pass around.
2017-03-02Change no-newline and error code reportingKévin Le Gouguec
- no newline: simply append a visible / - error code: move to first line and make rule red
2017-03-01Split prompt into two linesKévin Le Gouguec
User/host/working-directory/Git status go on the first line; the "prompt" line only contains the prompt symbol and the previous command's error code. Also fill the rest of the line when a command does not end with a newline.
2017-03-01(m) CleanupKévin Le Gouguec
- remove speculative parentheses - sort table by code
2017-02-28Make sure the prompt works when autowrap is offKévin Le Gouguec
To reproduce the issue: $ echo -e '\E[?7l' (cf. console_codes(4))
2017-01-16Work around TRAMP issueKévin Le Gouguec
TRAMP fails to connect to remote hosts that set this prompt.
2017-01-16Rename script to fit existing conventionKévin Le Gouguec
bash(1) already mentions _profile, _login, _logout and _history. .bashrc adds .bash_aliases (although .bashrc itself is an exception).
2016-11-10Use compound assignment to fill in code arrayKévin Le Gouguec
Also remove "white" since it's the default color.
2016-11-10(m) Echo directly instead of concatenatingKévin Le Gouguec
2016-11-10(m) Cleanup __fontifyKévin Le Gouguec
- stop leaking variables - remove usnused array entry
2016-11-10Check for git-sh-prompt availabilityKévin Le Gouguec
2016-11-10(m) Simplify case statementKévin Le Gouguec
2016-11-09(m) Bikeshed __set-promptKévin Le Gouguec
- every function should give explicit names to its arguments, so they might as well start with that; - this function's goal is to build PS1, so BUILDING_PS1=t should appear reasonably early to have some symmetry with unset BUILDING_PS1; - PS1 is the main output of this function, so its initialization should appear relatively early as well. … I'm trying to justify shuffling some assignments around in a commit message that no one will ever read. WHAT AM I DOING WITH MY LIFE.
2016-11-09(m) Add emphasis on hostnameKévin Le Gouguec
2016-11-08Keep track of current column to deduce correct rule lengthKévin Le Gouguec
Maybe a better option would be to display some bright red markers and display the full rule on a new line. 🤷
2016-11-08(m) Make sure "rule" is not exportedKévin Le Gouguec
2016-11-08(m) Be kind to future meKévin Le Gouguec
Document where those are coming from.
2016-11-08(m) Use literals instead of octal valuesKévin Le Gouguec
"\E" means "the escape character", and "\a" means "bell". References: bash(1) console_codes(4)
2016-11-08(m) Reduce focus on separatorsKévin Le Gouguec
2016-11-08Add "automatic" setting for hostname displayKévin Le Gouguec
This will show the hostname when logged in over SSH.
2016-11-05Add option for hostname displayKévin Le Gouguec
2016-11-05Simplify argument enumeration (again)Kévin Le Gouguec
2016-11-05(m) Move comment on non-printing charactersKévin Le Gouguec
2016-11-05Simplify argument enumerationKévin Le Gouguec
2016-11-05Simplify check for empty variableKévin Le Gouguec
Someday this is going to bite me in the ass. Right now though, I can't come up with a reason not to do this. Inspiration: test(1) -n STRING the length of STRING is nonzero STRING equivalent to -n STRING
2016-11-05Concatenate instead of echoingKévin Le Gouguec
TODO: measure whether this actually changes anything.
2016-11-04Add horizontal ruleKévin Le Gouguec
2016-11-04Add initial scriptKévin Le Gouguec