Skip to content

Instantly share code, notes, and snippets.

@PCouaillier
PCouaillier / fish_prompt.fish
Last active April 24, 2021 11:23
fish prompt base on my-aws to a look like zsh candy shell
function fish_prompt --description 'Write out the prompt'
# Cache exit status
set -l last_status $status
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_user
if test (id -u) -eq 0
set -g __fish_user '#'
else
set -g __fish_user '&'
@PCouaillier
PCouaillier / sysup
Last active August 24, 2022 13:11
simple script to keep a system up to date
#!/usr/bin/env sh
if command -v apt-fast > /dev/null 2>&1
then
sudo apt-fast update && sudo apt-fast upgrade -y
else
if command -v apt > /dev/null 2>&1
then
sudo apt update && sudo apt upgrade -y
fi