mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
bak: fixed directory handling
This commit is contained in:
parent
672ec0894d
commit
1335503cd6
@ -1,6 +1,6 @@
|
||||
function __bak_name
|
||||
# trim / for directories
|
||||
set arg (echo $argv[1] | sed "s/\///")
|
||||
set arg (echo $argv[1] | sed 's/\/$//')
|
||||
echo "$arg.(date +"%Y%m%d_%H%M%S").bak"
|
||||
end
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
# (c) Roman Inflianskas (rominf) <infroma@gmail.com>, 2014
|
||||
|
||||
function cpbak
|
||||
__bak cp $argv
|
||||
__bak 'cp -a' $argv
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user