New answers tagged bashrc
In addition to the PS1 environment variable, the PROMPT_COMMAND environment variable also affects your prompt. From the bash man page: If set, the value is executed as a command prior to issuing each primary prompt It is that command that is adding the unwanted content to your prompt. You can stop that behavior by unsetting the variable in your ...
To activate this completion you need the bash-completion package. If the package is installed (often by default) just add these lines in your .bashrc if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi If not: https://bash-completion.alioth.debian.org/
The [ is a test construct: $ help [ [: [ arg... ] Evaluate conditional expression. This is a synonym for the "test" builtin, but the last argument must be a literal `]', to match the opening `['. The -s is one of the available tests, it returns true if the file both exists and is not empty: $ help test | grep -- -s -s FILE True ...
cmd1 && cmd2 Runs cmd2 if and only if cmd1 is successful. So cmd1 && cmd2 is successful if both cmd1 and cmd2 are successful which is the idea for a "AND" operator. Here, cmd1 is the [ command (used to perform tests) and cmd2 is the . command (used to tell the shell to evaluate the code contained in a given file). For the [ command -s ...
Adding to @Louis Maddox 's answer, I would execute tmux part with; (exec tmux attach || exec tmux new-session)
Xcode and Fink|Homebrew|MacPorts on Mac OS X have these complications (they just largely hide it from you). There are two aspects to this problem, compiling, and running. Compiling will require a variety of details for any library installed to a custom path. This info for some libraries can be provided by pkg-config, e.g. for a little software depot I ...
Delete the trailing quote in your .bashrc. It should look like the following: # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions umask u=rwx,g=rwx,o=
Top 50 recent answers are included