Mercurial > ec-dotfiles
annotate bin/basicopt @ 680:a34ee4c7d0ce
[vimrc] Newer vim seem to have mouse enabled by default?
author | nanaya <me@nanaya.pro> |
---|---|
date | Mon, 13 Jun 2022 00:56:26 +0900 |
parents | 7f5234a312f7 |
children |
rev | line source |
---|---|
124
5bafb912837e
Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff
changeset
|
1 #!/bin/sh |
5bafb912837e
Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff
changeset
|
2 get_filename() { |
609 | 3 printf '%s\n' "$*" | sed -e 's/^\(.*\)\.[^.]*$/\1/' |
124
5bafb912837e
Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff
changeset
|
4 } |
5bafb912837e
Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff
changeset
|
5 get_extension() { |
609 | 6 if [ -n "$(printf '%s\n' "$*" | sed -e 's/^[^.]*//')" ]; then |
7 printf '%s\n' "$*" | sed -e 's/^.*\(\.[^.]*$\)/\1/' | |
124
5bafb912837e
Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff
changeset
|
8 else |
609 | 9 printf '%s\n' "" |
124
5bafb912837e
Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff
changeset
|
10 fi |
5bafb912837e
Massive addition of old scripts collection.
Edho Prima Arief <edho@myconan.net>
parents:
diff
changeset
|
11 } |