trim last slash on 'targz' argument #202

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@hencohen
Contributor
hencohen commented May 8, 2013

Currently, if we use 'targz dirname/'
it will create a filename called '.tar.gz' in the directory 'dirname'
this change removes the last slash from the argument

@hencohen hencohen trim last slash on 'targz' argument so if we use it like 'targz dirna…
…me/'

it would create 'dirname.tar.gz' in the current directory
instead of creating a file named '.tar.gz' in 'dirname'
5d4ebeb
@mathiasbynens
Owner

With this change, what happens if you do targz /? (Hypothetical example, of course.)

IIUC, targz / would create /.tar.gz. Good enough for me :)

@mathiasbynens mathiasbynens added a commit that referenced this pull request May 8, 2013
@hencohen @mathiasbynens hencohen + .functions: Tweak `targz`
Trim the trailing slash from the path argument passed to `targz`.

This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`.

Ref. #202.
a43f474
@mathiasbynens
Owner

Merged, thanks!

@mrkd mrkd added a commit to mrkd/dotfiles that referenced this pull request Apr 21, 2014
@hencohen @mrkd hencohen + mrkd .functions: Tweak `targz`
Trim the trailing slash from the path argument passed to `targz`.

This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`.

Ref. #202.
3461ab2
@thorsten thorsten pushed a commit to thorsten/dotfiles that referenced this pull request Dec 12, 2014
@hencohen hencohen + Thorsten Rinne .functions: Tweak `targz`
Trim the trailing slash from the path argument passed to `targz`.

This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`.

Ref. #202.
24316cf
@dmcass dmcass pushed a commit to dmcass/windows-dotfiles that referenced this pull request Mar 10, 2015
@hencohen @mathiasbynens hencohen + .functions: Tweak `targz`
Trim the trailing slash from the path argument passed to `targz`.

This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`.

Ref. #202.
66b4018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment