Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
c32afc69
Commit
c32afc69
authored
Jun 11, 2014
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #169 from rominf/bak
parents
b616d177
6c45d6bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
plugins/bak/bak.load
plugins/bak/bak.load
+22
-0
plugins/bak/cpbak.fish
plugins/bak/cpbak.fish
+6
-0
plugins/bak/mvbak.fish
plugins/bak/mvbak.fish
+6
-0
No files found.
plugins/bak/bak.load
0 → 100644
View file @
c32afc69
function __bak_name
# trim / for directories
set arg (echo $argv[1] | sed "s/\///")
echo "$arg.(date +"%Y%m%d_%H%M%S").bak"
end
function __bak_help
echo -e \
"Usage:
$argv[1]bak SOURCE..."
end
function __bak
set program $argv[1]
if [ (count $argv) -gt 1 ]
for arg in $argv[2..-1]
eval $program $arg (__bak_name $arg)
end
else
__bak_help $argv[1]
end
end
plugins/bak/cpbak.fish
0 → 100644
View file @
c32afc69
# Function to copy files and directories (a.txt copy to a.txt.20140608_195859.bak)
# (c) Roman Inflianskas (rominf) <infroma@gmail.com>, 2014
function cpbak
__bak cp $argv
end
plugins/bak/mvbak.fish
0 → 100644
View file @
c32afc69
# Function to rename files and directories (a.txt rename to a.txt.20140608_195859.bak)
# (c) Roman Inflianskas (rominf) <infroma@gmail.com>, 2014
function mvbak
__bak mv $argv
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment