fig icon indicating copy to clipboard operation
fig copied to clipboard

Importing dotfiles: variables with wildcard (*)

Open cyugao opened this issue 3 years ago • 0 comments

Description:

Please include a detailed description of the issue (and an image or screen recording, if applicable)

Importing dotfiles does not handle wildcards correctly. My .zshrc file contains the following snippet.

if [[ -n $SSH_CONNECTION ]]; then
  export EDITOR='vim'
else
  export EDITOR='mvim -f --nomru -c "au VimLeave * !open -a iTerm"'
fi

After importing, during the start of a new shell, the EDITOR variable is expanded when exported, causing an error. I spent quite some time to find this cause... The imports do not handle the conditional either. I think maybe fig should ignore a snippet like the above or give a warning.

Details:

macOS Fig Shell
12.6.0 Version 1.0.61 (B528) /bin/zsh
fig diagnostic

Version 1.0.61 (B528) [ABC] 
UserShell: /bin/zsh
Bundle path: /Applications/Fig.app
Autocomplete: true
Settings.json: true
CLI installed: true
CLI tool path: /Users/changyu/.fig/bin/fig
Accessibility: true
SSH Integration: false
Tmux Integration: false
iTerm Integration: true [Authenticated]
Hyper Integration: false
VSCode Integration: true
Docker Integration: false
Symlinked dotfiles: true
Only insert on tab: false
UNIX Socket Exists: true
Installation Script: true
PseudoTerminal Path: /Users/changyu/.opam/cs3110-2021fa/bin:/Users/changyu/miniforge3/bin:/Users/changyu/miniforge3/condabin:/opt/homebrew/opt/ruby/bin:/usr/local/smlnj/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/Users/changyu/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/changyu/.fig/bin:/Users/changyu/.local/bin:/Users/changyu/Library/Application Support/Coursier/bin:/Users/changyu/Library/Application Support/JetBrains/Toolbox/scripts:/Users/changyu/Library/Application Support/JetBrains/Toolbox/scripts:/Users/changyu/Library/Application Support/Coursier/bin:/Users/changyu/.local/bin:/Users/changyu/.fig/bin:/Applications/Wireshark.app/Contents/MacOS:/opt/X11/bin:/Library/TeX/texbin:/Users/changyu/.cargo/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/smlnj/bin:/opt/homebrew/opt/ruby/bin:/Users/changyu/miniforge3/bin:/Users/changyu/miniforge3/condabin:/Users/changyu/.opam/cs3110-2021fa/bin
SecureKeyboardInput: false
SecureKeyboardProcess: 
Current active process: ??? (???) - ???
Current terminal session: ???
Current working directory: ???
Current window identifier: ???

cyugao avatar Sep 24 '22 18:09 cyugao