|
| 1 | +# Run the shell hook defined in shell.nix or flake.nix |
| 2 | +eval $shellHook |
| 3 | + |
| 4 | +# Begin testdata/shellrc_unifiedenv/basic/shellrc |
| 5 | + |
| 6 | +# Set up the prompt |
| 7 | + |
| 8 | +autoload -Uz promptinit |
| 9 | +promptinit |
| 10 | +#prompt adam1 |
| 11 | + |
| 12 | +setopt histignorealldups sharehistory |
| 13 | + |
| 14 | +# Use emacs keybindings even if our EDITOR is set to vi |
| 15 | +bindkey -e |
| 16 | + |
| 17 | +# Keep 1000 lines of history within the shell and save it to ~/.zsh_history: |
| 18 | +HISTSIZE=1000 |
| 19 | +SAVEHIST=1000 |
| 20 | +HISTFILE=~/.zsh_history |
| 21 | + |
| 22 | +# Use modern completion system |
| 23 | +autoload -Uz compinit |
| 24 | +compinit |
| 25 | + |
| 26 | +zstyle ':completion:*' auto-description 'specify: %d' |
| 27 | +zstyle ':completion:*' completer _expand _complete _correct _approximate |
| 28 | +zstyle ':completion:*' format 'Completing %d' |
| 29 | +zstyle ':completion:*' group-name '' |
| 30 | +zstyle ':completion:*' menu select=2 |
| 31 | +eval "$(dircolors -b)" |
| 32 | +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} |
| 33 | +zstyle ':completion:*' list-colors '' |
| 34 | +zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s |
| 35 | +zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' |
| 36 | +zstyle ':completion:*' menu select=long |
| 37 | +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s |
| 38 | +zstyle ':completion:*' use-compctl false |
| 39 | +zstyle ':completion:*' verbose true |
| 40 | + |
| 41 | +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' |
| 42 | +zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' |
| 43 | + |
| 44 | +# End testdata/shellrc_unifiedenv/basic/shellrc |
| 45 | + |
| 46 | +# Begin Devbox Post-init Hook |
| 47 | + |
| 48 | +PATH="$DEVBOX_PATH_PREPEND:$PATH" |
| 49 | + |
| 50 | +# Prepend to the prompt to make it clear we're in a devbox shell. |
| 51 | +export PS1="(devbox) $PS1" |
| 52 | + |
| 53 | +# End Devbox Post-init Hook |
| 54 | + |
| 55 | +# Switch to the directory where devbox.json config is |
| 56 | +workingDir=$(pwd) |
| 57 | +cd path/to/projectDir |
| 58 | + |
| 59 | +# Begin Plugin Init Hook |
| 60 | + |
| 61 | +echo "Welcome to the devbox!" |
| 62 | + |
| 63 | +# End Plugin Init Hook |
| 64 | + |
| 65 | +# Begin Devbox User Hook |
| 66 | + |
| 67 | +echo "Hello from a devbox shell hook!" |
| 68 | + |
| 69 | +# End Devbox User Hook |
| 70 | + |
| 71 | +cd $workingDir |
| 72 | + |
| 73 | +# Begin Script command |
| 74 | + |
| 75 | +# End Script command |
0 commit comments