Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt manipulation errs if PS1 contained spaces #41

Closed
0xmohit opened this issue Aug 7, 2015 · 0 comments · Fixed by #42
Closed

Prompt manipulation errs if PS1 contained spaces #41

0xmohit opened this issue Aug 7, 2015 · 0 comments · Fixed by #42

Comments

@0xmohit
Copy link
Contributor

0xmohit commented Aug 7, 2015

This isn't anything but a quoting issue. The default value of PS1 on ubuntu results in the following while issuing source gvp:

env: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$: No such file or directory

Adding set -x to gvp before sourcing it explains it:

++ gvp
++ case "$1" in
++ store_current_prompt
+++ current_prompt
+++ echo '\[\e]0;\u@\h:' '\w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$'
++ store_prompt '\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$'
++ PROMPT_MANIPULATION_OLD='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$'
++ export PROMPT_MANIPULATION_OLD
++ env 'PROMPT_MANIPULATION_OLD=\[\e]0;\u@\h:' '\w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$'
env: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$: No such file or directory
++ prompt_manipulation_old='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$'
++ prefix_prompt '(gvp)'
++ PS1='(gvp)\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
++ mkdir -p .godeps/src .godeps/pkg .godeps/bin
++ ln -snf .godeps/bin bin
+++ pwd
++ GVP_DIR=/home/user/.godeps
++ GOBIN=/home/user/.godeps/bin
++ GOPATH=/home/user/.godeps:/home/user:
++ PATH=/home/user/.godeps/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/tmp/go/bin
++ export GOBIN GOPATH GVP_NAME PATH
++ echo '>> Local GOPATH set.'
>> Local GOPATH set.
++ '[' -n '' ']'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant