Skip to content

Commit

Permalink
Escape dotly_path when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Dec 6, 2020
1 parent a5ab629 commit 6355df4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/dot
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fzf_prompt() {

script="$(echo "$paths" |
xargs -I % sh -c 'echo "$(basename $(dirname %)) $(basename %)"' |
fzf --height 100% --preview '$DOTLY_PATH/bin/dot $(echo {} | cut -d" " -f 1) $(echo {} | cut -d" " -f 2) -h')"
fzf --height 100% --preview '"$DOTLY_PATH/bin/dot" $(echo {} | cut -d" " -f 1) $(echo {} | cut -d" " -f 2) -h')"

printf "%s" "$script"
read -r args
Expand Down
2 changes: 0 additions & 2 deletions installer
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,4 @@ cd "$DOTLY_PATH"

"$PWD/bin/dot" self install

git init >/dev/null

_a "🎉 dotly installed correctly! 🎉"
4 changes: 2 additions & 2 deletions scripts/self/install
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ docs::parse "$@"
dot() { "$DOTLY_PATH/bin/dot" "$@"; }

output::answer "Creating dotfiles structure"
$DOTLY_PATH/bin/dot dotfiles create 2>&1
"$DOTLY_PATH/bin/dot" dotfiles create 2>&1

if platform::is_macos; then
output::answer "🍎 Setting up macOS platform"
Expand All @@ -47,7 +47,7 @@ fi

# @todo Backup if exists before
output::answer "Setting up symlinks"
$DOTLY_PATH/bin/dot symlinks apply 2>&1
"$DOTLY_PATH/bin/dot" symlinks apply 2>&1

if ! platform::command_exists zsh; then
installer::install_zsh
Expand Down
2 changes: 1 addition & 1 deletion scripts/shell/zsh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ case $1 in

/bin/zsh -c "source ${ZDOTDIR:-${HOME}}/.zlogin"

$DOTLY_PATH/bin/dot shell zsh reload_completions
"$DOTLY_PATH/bin/dot" shell zsh reload_completions
;;
"test_performance")
hyperfine '/bin/zsh -i -c exit' '/usr/local/bin/zsh -i -c exit' --warmup 1
Expand Down
2 changes: 1 addition & 1 deletion shell/zsh/themes/prompt_codelytv_setup
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DIRTY="✗"
NONE=""

prompt_codelytv_pwd() {
prompt_short_dir=$($DOTLY_PATH/bin/dot filesystem short_pwd)
prompt_short_dir=$("$DOTLY_PATH/bin/dot" filesystem short_pwd)
print -n "%F{yellow}${prompt_short_dir}"
}

Expand Down

0 comments on commit 6355df4

Please sign in to comment.