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

Use absolute path to avoid user alias #29

Merged
merged 2 commits into from May 14, 2016
Merged

Use absolute path to avoid user alias #29

merged 2 commits into from May 14, 2016

Conversation

ghost
Copy link

@ghost ghost commented Apr 4, 2016

I have this alias in my config
cp='cp -iv'
and every time I cd to a directory I receive a message like this

‘/home/k1/.enhancd/enhancd.log’ -> ‘/home/k1/.enhancd/enhancd.backup’
‘/home/k1/.enhancd/enhancd.04041608405063961462’ -> ‘/home/k1/.enhancd/enhancd.log’
‘/home/k1/.enhancd/enhancd.log’ -> ‘/home/k1/.enhancd/enhancd.backup’
‘/home/k1/.enhancd/enhancd.040416084050639617392’ -> ‘/home/k1/.enhancd/enhancd.log’
‘/home/k1/.enhancd/enhancd.log’ -> ‘/home/k1/.enhancd/enhancd.backup’
‘/home/k1/.enhancd/enhancd.040416084051639630319’ -> ‘/home/k1/.enhancd/enhancd.log

this commit solves the issue by using absolute path and avoiding any alias may have been defined by user

I had this alias in my config
`cp='cp -iv'`
and every time I cd to a directory I receive a message like this
```
‘/home/k1/.enhancd/enhancd.log’ -> ‘/home/k1/.enhancd/enhancd.backup’
‘/home/k1/.enhancd/enhancd.04041608405063961462’ -> ‘/home/k1/.enhancd/enhancd.log’
‘/home/k1/.enhancd/enhancd.log’ -> ‘/home/k1/.enhancd/enhancd.backup’
‘/home/k1/.enhancd/enhancd.040416084050639617392’ -> ‘/home/k1/.enhancd/enhancd.log’
‘/home/k1/.enhancd/enhancd.log’ -> ‘/home/k1/.enhancd/enhancd.backup’
‘/home/k1/.enhancd/enhancd.040416084051639630319’ -> ‘/home/k1/.enhancd/enhancd.log
```  
this commit solves the issue by using absolute path and avoiding any alias my have been defined by user
@babarot
Copy link
Owner

babarot commented May 11, 2016

Thanks for your contribution! However, you should replace /bin/cp with command cp.

@ghost
Copy link
Author

ghost commented May 12, 2016

Done
@b4b4r07

@babarot babarot merged commit 0f2a308 into babarot:master May 14, 2016
@babarot
Copy link
Owner

babarot commented May 14, 2016

Thank you for your contribution! I have merged.

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 this pull request may close these issues.

1 participant