Skip to content

Commit

Permalink
🐟 FASTER
Browse files Browse the repository at this point in the history
fish_user_paths は set 方法を問わず fish_variables に保存されていくらしい…
  • Loading branch information
otofune committed Jul 15, 2021
1 parent 8f05f08 commit 111ce82
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.swp
*.env
1 change: 1 addition & 0 deletions cmd/configurator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configurator
Binary file removed cmd/configurator/configurator
Binary file not shown.
13 changes: 9 additions & 4 deletions platform-all/replacement/.config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ ssh-add -A > /dev/null 2>&1
set -x GOPATH ~/projects

# add path
set -x fish_user_paths $GOPATH/bin $fish_user_paths
set -x fish_user_paths $HOME/bin $fish_user_paths
set -x fish_user_paths $HOME/Library/Python/3.8/bin/ $fish_user_paths
set -x fish_user_paths $HOME/.cargo/bin $fish_user_paths
set -x PATH $GOPATH/bin $PATH
set -x PATH $HOME/bin $PATH
# not fish syntax: source ~/.cargo/env
set -x PATH $HOME/.cargo/bin $PATH

if which anyenv > /dev/null
# backward compatibility
Expand Down Expand Up @@ -48,3 +47,9 @@ end

source ~/.config/fish/on-variable-handlers.fish
source ~/.config/fish/aliases.fish

# The next line updates PATH for the Google Cloud SDK.
if [ -f "$HOME/google-cloud-sdk/path.fish.inc" ]; . "$HOME/google-cloud-sdk/path.fish.inc"; end

# opam configuration
source /Users/owner/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function fish_title
end
5 changes: 3 additions & 2 deletions platform-darwin/replacement/.config/fish/environment.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# (c) otofune

ls ~/Library/LaunchAgents/local* | xargs -I% launchctl load % 2>/dev/null
set -x PATH $HOME/Library/Python/3.8/bin/ $PATH
set -x PATH /usr/local/opt/libpq/bin $PATH

set -x fish_user_paths /usr/local/opt/libpq/bin $fish_user_paths
ls ~/Library/LaunchAgents/local* | xargs -I% launchctl load % 2>/dev/null

export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/env</string>
<string>bash</string>
<string>sh</string>
<string>-c</string>
<string>brew update | terminal-notifier -title brew</string>
</array>
Expand Down
12 changes: 10 additions & 2 deletions platform-linux/replacement/.config/fish/environment.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# (c) otofune

# update packages once per hour at background
# this part is not so well. it's better choise to use cron
set update_lock_dir ~/.config/fish/bu
mkdir -p $update_lock_dir
set update_lock ".u_"(date '+%y%m%d-%H')
if [ ! -f $update_lock_dir/$update_lock ]
touch $update_lock_dir/$update_lock
__check_update
end

alias docker="sudo docker"
alias docker-compose="sudo docker-compose"
alias pacman="sudo pacman"
Expand All @@ -14,6 +24,4 @@ if ! set -q $DISPLAY
end
end

eval (opam config env)

export XDG_CONFIG_HOME=$HOME/.config

0 comments on commit 111ce82

Please sign in to comment.