Skip to content

Instantly share code, notes, and snippets.

@zombiezen
Last active November 15, 2023 07:34
Show Gist options
  • Save zombiezen/d24fbe7d59d56f61b762ec1435699df2 to your computer and use it in GitHub Desktop.
Save zombiezen/d24fbe7d59d56f61b762ec1435699df2 to your computer and use it in GitHub Desktop.

Revisions

  1. zombiezen revised this gist Jun 13, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions .profile
    Original file line number Diff line number Diff line change
    @@ -17,4 +17,6 @@ if [ -n "$BASH_VERSION" ]; then
    . "$HOME/.bashrc"
    fi
    fi

    # Assume that you ran: ./configure --prefix=$HOME/zsh && make -j2 && make install
    [ -f $HOME/zsh/bin/zsh ] && exec $HOME/zsh/bin/zsh
  2. zombiezen created this gist Jun 13, 2017.
    20 changes: 20 additions & 0 deletions .profile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    # Copyright 2017 Google Inc.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    # https://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.

    if [ -n "$BASH_VERSION" ]; then
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
    fi
    [ -f $HOME/zsh/bin/zsh ] && exec $HOME/zsh/bin/zsh
    17 changes: 17 additions & 0 deletions .zshenv
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    # Copyright 2017 Google Inc.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    # https://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.

    if [[ -e "/google/google-cloud-sdk/path.zsh.inc" ]]; then
    source "/google/google-cloud-sdk/path.zsh.inc"
    fi
    27 changes: 27 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # Copyright 2017 Google Inc.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    # https://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.

    setopt promptsubst
    PROMPT='%n@${DEVSHELL_PROJECT_ID:-cloudshell}:%~ %(!.#.Z) '
    if [[ -e "/google/google-cloud-sdk/completion.zsh.inc" ]]; then
    source "/google/google-cloud-sdk/completion.zsh.inc"
    fi
    onexit () {
    for FILE in /google/devshell/bash_exit.google.d/*; do
    if [ -x "$FILE" ]; then
    "$FILE"
    fi
    done
    }
    trap onexit EXIT