Permalink
Browse files

Initial implementation

  • Loading branch information...
0 parents commit 1bafe247bd1698077b5baf3bd971ff4cfb9c90b3 @manojlds committed Jul 29, 2012
Showing with 39 additions and 0 deletions.
  1. +4 −0 README.md
  2. +2 −0 poshmarks.csv
  3. +33 −0 poshmarks.ps1
@@ -0,0 +1,4 @@
+**POSHMARKS**
+
+An implementation of [bashmarks](https://github.com/huyng/bashmarks "bashmarks") for Powershell
+
@@ -0,0 +1,2 @@
+"Name","Key","Value"
+"1","1","\"
@@ -0,0 +1,33 @@
+$marks = @{};
+$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
+$marksPath = "$scriptDir\poshmarks.csv"
+
+if(test-path $marksPath){
+ import-csv $marksPath | %{$marks[$_.key]=$_.value}
+}
+
+function s($number){
+ $marks["$number"] = (pwd).path
+ $marks.getenumerator() | export-csv $marksPath -notype
+}
+
+function g($number){
+ cd $marks["$number"]
+}
+
+function p($number){
+ $marks["$number"]
+}
+
+function d($number){
+ $marks.remove("$number")
+ $marks.getenumerator() | export-csv $marksPath -notype
+}
+
+function mdump{
+ $marks.getenumerator() | export-csv $marksPath -notype
+}
+
+function l{
+ $marks
+}

0 comments on commit 1bafe24

Please sign in to comment.