Skip to content

Instantly share code, notes, and snippets.

@mtimkovich
Created November 21, 2020 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtimkovich/4bf7933a500b97e0ec430c74df4bcb18 to your computer and use it in GitHub Desktop.
Save mtimkovich/4bf7933a500b97e0ec430c74df4bcb18 to your computer and use it in GitHub Desktop.
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