Skip to content

Commit

Permalink
feat: add fish installation
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Oct 21, 2023
1 parent 7979303 commit 2ce2aea
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
17 changes: 17 additions & 0 deletions fish/conf.d/smapp.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function killsh --argument 1
lsof -ti:"$1" | xargs kill -9
end

function fwdpg --argument 1 2
ssh -N -f -L "$2":localhost:"$2" ubuntu@os-playground"$1"
end

function pg --argument 1
ssh os-playground"$1"
end

function fwdhulk --argument 1
ssh -N -f -L "$1":localhost:"$1" hulk
end

alias hulk="ssh hulk"
13 changes: 13 additions & 0 deletions fish/config.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end

switch (uname)
case Darwin
eval "$(/opt/homebrew/bin/brew shellenv)"
end

starship init fish | source

fish_add_path $HOME/bin
fish_add_path $HOME/.local/bin
37 changes: 37 additions & 0 deletions scripts/fish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

usage() {
echo -n -e "The user-friendly command line shell"

# shellcheck disable=1004,2016
echo '
__ _ _
/ _(_)___| |__
| |_| / __| |_ \
| _| \__ \ | | |
|_| |_|___/_| |_|
'
}

main_pacman() {
require_pacman fish
}

main_brew() {
require_brew fish
}

main() {
if [ ! -f ~/.config/fish/conf.d/omf.fish ]; then
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
fi

grep "fish" /etc/shells || which fish | sudo tee -a /etc/shells

configfile "fish" "config.fish"
}

main_elahe() {
configfile "fish/conf.d" "smapp.fish"
}

0 comments on commit 2ce2aea

Please sign in to comment.