Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var PATH $PATH ~bin
function fish_prompt
echo -n $USER@(hostname) ''
set_color $fish_color_cwd
prompt_dir
set_color normal
echo -n ' $ '
end
bind \cf accept-autosuggestion execute
# Aliases
alias rm='rm -vi'
alias cp='cp -vi'
alias mv='mv -vi'
alias ..='cd ..'
alias :q='exit'
alias grep='grep -s'
alias please='sudo'
alias apt-search='apt search --names-only'
# Attaches tmux to the last session; creates a new session if none exists.
alias t='tmux attach || tmux new-session'
# Attaches tmux to a session (example: ta portal)
alias ta='tmux attach -t'
alias tl='tmux ls'
alias tk='tmux kill-session -t'
alias tn='tmux new -s'
# Functions
function up
for i in (seq 1 $argv)
cd ..
end
end
function prompt_dir
if test $PWD = $HOME
echo -n "~"
else
echo -n (basename $PWD)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.