-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from databio/dev
Release 0.7.2
- Loading branch information
Showing
12 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.7.1" | ||
__version__ = "0.7.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
source "${BULKERSHELLRC}" | ||
echo $BULKERPROMPT | ||
if [ -z ${BULKERPROMPT+x} ]; then echo "No prompt change"; else PS1="${BULKERPROMPT}"; fi | ||
export PATH="${BULKERPATH}:${PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Customizing bulker prompts | ||
|
||
By default, when you activate a crate, bulker will change your prompt. You can customize it by specifying the `shell_prompt` attribute in your bulker config. *Make sure you enclose the value in single quotes*; if you use double-quotes the parser will re-escape your prompt escape sequences and break stuff. Here are some examples: | ||
|
||
In these examples we'll activate the crate like this: | ||
|
||
```console | ||
bulker activate databio/lab | ||
``` | ||
|
||
The variables that could be displayed are these: | ||
|
||
- namespace: `databio` | ||
- crate name: `lab` | ||
- username: `nsheff` | ||
- host: `zither` | ||
- working directory: `code` | ||
|
||
# Default prompt | ||
|
||
The default bulker prompt shows you the name of the crate you've activated, colored in yellow. Bulker uses `\b` to indicate the name of the bulker namespace and crate. The default prompt is the equivalent of putting this in your config: | ||
|
||
```yaml | ||
shell_prompt: '\[\033[01;93m\]\b|\[\033[00m\]\[\033[01;34m\]\w\[\033[00m\]\$ ' | ||
``` | ||
 | ||
## Include username and hostname | ||
In addition the bulker-provided `\b`, there are lots of other shell-provided variables you can use, like `\u` for username and `\h` for hostname, and `\W` for working directory path. You can look up lists of these by searching for *customizing bash PS1 prompt*. Here's a simple sample using *username* and *hostname*: | ||
|
||
```yaml | ||
shell_prompt: '[\u@\h(\b) \W] $ ' | ||
``` | ||
|
||
 | ||
|
||
## Change colors | ||
|
||
You can al;so use any terminal colors compatible with your terminal. | ||
|
||
|
||
```yaml | ||
shell_prompt: '\u@\h|\e[94m\b\[\e[00m\]:\e[90m\W\e[39m $ ' | ||
``` | ||
|
||
 | ||
|
||
|
||
## Emoji | ||
|
||
Yes, you can even put emoji in your prompt, if that's your thing: | ||
|
||
```yaml | ||
shell_prompt: '⚓ \e[94m\b\[\e[00m\]:\e[90m\W\e[39m $ ' | ||
``` | ||
|
||
 | ||
|
||
|
||
## Date/time | ||
|
||
This example uses a custom date/time format along with 256-color codes: | ||
|
||
```yaml | ||
shell_prompt: '\D{%y/%m/%d %H:%M}⚓ \e[38;5;141m\b\[\e[00m\]:\e[38;5;29m\W\e[39m $ ' | ||
``` | ||
|
||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
yacman>=0.6.6 | ||
yacman>=0.8.1 | ||
pyyaml>=5.1 | ||
logmuse>=0.2.0 | ||
jinja2 | ||
|