Open bmichotte opened 2 years ago
Hey @bmichotte, sorry for the issue! Can you send the output of fig init fish post
? If it's got sensitive info you can email to robert [at] fig [dot] io 🙂
Hi @SeparateRecords
here you are
# post for fish
if test -z "$FIG_DOTFILES_SOURCED"
alias 'grm' 'git rm'
alias 'grep' 'grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
alias 'gpv' 'git push -v'
alias 'gpu' 'git push upstream'
alias 'gpsup' 'git push --set-upstream origin $(git_current_branch)'
alias 'gpristine' 'git reset --hard && git clean -dffx'
alias 'gpr' 'git pull --rebase'
alias 'gpoat' 'git push origin --all && git push origin --tags'
alias 'gloga' 'git log --oneline --decorate --graph --all'
alias 'glog' 'git log --oneline --decorate --graph'
alias 'glod' 'git log --graph --pretty='"'"'\'"'"''"'"'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'"'"'\'
alias 'git-svn-dcommit-push' 'git svn dcommit && git push github $(git_main_branch):svntrunk'
alias 'gignore' 'git update-index --assume-unchanged'
alias 'gignored' 'git ls-files -v | grep "^[[:lower:]]"'
alias 'ghh' 'git help'
alias 'bundletool' 'java -jar /Users/benjamin/bin/bundletool.jar'
alias 'bfg' 'java -jar /Users/benjamin/bin/bfg.jar'
alias 'clean_simulators' 'xcrun simctl delete unavailable'
alias 'art' 'php artisan'
alias '...' '../..'
set -x LC_COLLATE "en_GB.UTF-8"
alias 'gf' 'git fetch'
alias 'gdup' 'git diff @{upstream}'
alias 'gcn!' 'git commit -v --no-edit --amend'
alias 'gcmsg' 'git commit -m'
alias 'gcm' 'git checkout $(git_main_branch)'
alias 'gclean' 'git clean -id'
alias 'gcan!' 'git commit -v -a --no-edit --amend'
set -x LC_NUMERIC "en_GB.UTF-8"
alias 'gbsr' 'git bisect reset'
set -x LS_COLORS "di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:"
alias 'gapa' 'git add --patch'
alias 'gam' 'git am'
alias 'download' '~/bin/download.rb'
alias 'gbsb' 'git bisect bad'
set -x PAGER "less"
alias 'gb' 'git branch'
set -x ZSH "/Users/benjamin/.oh-my-zsh"
set -g FIG_DOTFILES_SOURCED 1
end
if test -z "$FIG_CHECKED_PROMPTS"
begin; fig app prompts &; end
set -g FIG_CHECKED_PROMPTS 1
end
builtin contains $HOME/.fig/bin $PATH
or set --append PATH $HOME/.fig/bin
builtin contains $HOME/.local/bin $PATH
or set --append PATH $HOME/.local/bin
# if test "$FIG_DID_NOT_EXEC_FIGTERM" = 1
# and test "$FIG_TERM" != 1
# or set --query INSIDE_EMACS
# set --erase FIG_DID_NOT_EXEC_FIGTERM
# exit
# end
# Open workflows on keyboard shortcut
set --query FIG_WORKFLOWS_KEYBIND || set FIG_WORKFLOWS_KEYBIND '\cf'
# function fig-open-workflows
# fig run
# commandline -f repaint
# end
# bind (string unescape $FIG_WORKFLOWS_KEYBIND) fig-open-workflows
set --export TTY (command tty)
set --export FIG_PID $fish_pid
set FIG_HOSTNAME (fig _ hostname; or command hostname -f 2> /dev/null; or command hostname)
set FIG_SHELL_PATH (fig _ get-shell)
if test -e /proc/1/cgroup; and command grep -q docker /proc/1/cgroup
set FIG_IN_DOCKER 1
else if test -f /.dockerenv
set FIG_IN_DOCKER 1
else
set FIG_IN_DOCKER 0
end
function fig_osc
builtin printf "\033]697;$argv[1]\007" $argv[2..-1]
end
function fig_copy_fn
functions --erase $argv[2]
functions --copy $argv[1] $argv[2]
#builtin functions $argv[1] | sed "s/^function $argv[1]/function $argv[2]/" | source
end
function fig_fn_defined
functions --query $argv[1]
#test (builtin functions $argv[1] | command grep -vE '^ *(#|function |end$|$)' | command wc -l | command xargs) != 0
end
function fig_wrap_prompt
set -l last_status $status
fig_osc StartPrompt
builtin printf "%b" (string join "\n" $argv)
fig_osc EndPrompt
return $last_status
end
function fig_preexec --on-event fish_preexec
fig_osc PreExec
if fig_fn_defined fig_user_mode_prompt
fig_copy_fn fig_user_mode_prompt fish_mode_prompt
end
if fig_fn_defined fig_user_right_prompt
fig_copy_fn fig_user_right_prompt fish_right_prompt
end
fig_copy_fn fig_user_prompt fish_prompt
set fig_has_set_prompt 0
end
function fig_precmd --on-event fish_prompt
set -l last_status $status
if test -n "$SSH_TTY"
fig_osc "SSH=1"
else
fig_osc "SSH=0"
end
fig_osc "Docker=%d" "$FIG_IN_DOCKER"
fig_osc "Dir=%s" "$PWD"
fig_osc "Shell=fish"
fig_osc "ShellPath=%s" "$FIG_SHELL_PATH"
if test -n "$WSL_DISTRO_NAME"
fig_osc "WSLDistro=%s" "$WSL_DISTRO_NAME"
end
fig_osc "PID=%d" "$fish_pid"
fig_osc "SessionId=%s" "$TERM_SESSION_ID"
fig_osc "ExitCode=%s" "$last_status"
fig_osc "TTY=%s" (tty)
fig_osc "Log=%s" "$FIG_LOG_LEVEL"
fig_osc "FishSuggestionColor=%s" "$fish_color_autosuggestion"
if test -n "$USER"
fig_osc "Hostname=%s@%s" "$USER" "$FIG_HOSTNAME"
else
fig_osc "Hostname=%s@%s" root "$FIG_HOSTNAME"
end
if test $fig_has_set_prompt = 1
fig_preexec
end
if fig_fn_defined fish_mode_prompt
fig_copy_fn fish_mode_prompt fig_user_mode_prompt
function fish_mode_prompt
fig_wrap_prompt (fig_user_mode_prompt)
end
end
if fig_fn_defined fish_right_prompt
fig_copy_fn fish_right_prompt fig_user_right_prompt
function fish_right_prompt
fig_wrap_prompt (fig_user_right_prompt)
end
end
fig_copy_fn fish_prompt fig_user_prompt
function fish_prompt
fig_wrap_prompt (fig_user_prompt)
fig_osc NewCmd
end
set fig_has_set_prompt 1
if command -v fig &>/dev/null
switch (fig _ pre-cmd)
case EXEC_NEW_SHELL
set -ge FIG_DOTFILES_SOURCED
exec fish
end
end
end
set fig_has_set_prompt 0
if test -n "$PROCESS_LAUNCHED_BY_FIG"
fig_osc DoneSourcing
end
Interesting, looks like your glod
alias is causing the issue. @rahulsarathy can you take a look at the quoting logic for this? I'm happy to investigate if you want but for the most part fish quoting rules are the same as zsh.
For now @bmichotte you can replace it with this string:
git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'
The original alias has a bunch of extra unnecessary quotes in it to work around zsh's quoting rules, but fig makes it pretty simple.
Alternatively, to disable it for fish:
Mhhh, ok, for some reason, it loots like fig imported the dotfiles from my old zsh and oh-my-zsh config and (broke it btw)
Is there a way to specify the dotfiles, we want to import ?
Description:
When I open my terminal (iTerm, Hyper), I have the following error
The content of this 99_file_post.fish file is the following
Details:
fig diagnostic