Commit graph

15 commits

Author SHA1 Message Date
5be5f80179 Add bash role 2019-11-15 17:11:24 +00:00
f65c4858ab Add support for per-user bash completion files 2019-11-13 14:42:07 +01:00
4e9c8e8470 Ensure PATH directories are in correct order
Previously we only checked if the new directory was already in the PATH
and, if yes, didn't prepend it. This can cause the new directory to be
in an unexpected position.

Now we first remove any occurrences of the new directory (to prevent
duplication) and prepend it so it's in the position we expect.
2019-11-11 13:04:25 +01:00
10ad8282e2 Fix glob for bash completions 2019-11-11 11:43:53 +01:00
b8c257ff9b Shorten unnecessarily long parts 2019-11-11 11:37:11 +01:00
d5245eab46 Keep installation prefix in the environment 2019-11-11 11:20:24 +01:00
a49fe75566 Refactor bash PROMPT_COMMAND function
Two main changes:
    - avoid 2 additional fork() calls by evaluating \j instead of using
      $(jobs | wc -l) -> one fork for subshell and another for `wc`.
    - make the build up of the prompt a bit more modular by using an
      array to collect the pieces and "sort of" join them in the end.
2019-11-08 13:38:28 +01:00
a9e50f2ba8 Call __git_ps1 as function instead of command substitution
This results in a slightly faster prompt because it saves us one fork()
call for the subshell that now doesn't have to be instantiated.
2019-11-08 10:44:59 +01:00
7243dc02b3 Minor refactoring
Just renaming last_status to exit because the latter is a more common
term.
2019-11-08 10:33:17 +01:00
f178b0c3cf Fix sourcing of local bash configuration 2019-11-08 10:03:22 +01:00
907eb892de Improve bash prompt speed
Avoiding starting many processes during creation of the PS1 string makes
the shell much more responsive, especially under Cygwin, which has
problems with fork().
2019-11-08 09:22:42 +01:00
c5baba5f5f Another useful alias for getting IP information
Also use -s flag in curl so we don't get progress bars.
2019-11-03 03:27:14 +01:00
d053c5c82c bashrc aliases for better head & tail 2019-11-03 03:22:12 +01:00
5bbbfb0632 Replace ~/.python_history with $XDG_CACHE_HOME/python/history 2019-11-03 02:52:18 +01:00
f7a498dbb7 Use XDG Base Directory Specification
SSH is an exception because there seems to be no good way of supporting
XDG. Patience, I guess...
2019-11-03 01:53:27 +01:00
Renamed from dotfiles/.bashrc (Browse further)