dots: public mirror (history reset after licence cleanup)
This commit is contained in:
commit
693822ad5f
226 files changed
+22502
No files matched your search
@@ -0,0 +1,18 @@
|
||||
function copy-commandline
|
||||
set -l cmd (commandline)
|
||||
if test -n "$cmd"
|
||||
if type -q pbcopy
|
||||
echo -n "$cmd" | pbcopy
|
||||
else if type -q xclip
|
||||
echo -n "$cmd" | xclip -selection clipboard
|
||||
else if type -q wl-copy
|
||||
echo -n "$cmd" | wl-copy
|
||||
end
|
||||
|
||||
# Provide brief visual feedback in the prompt
|
||||
set -l original_cmd (commandline)
|
||||
commandline -r "Copied!"
|
||||
sleep 0.4
|
||||
commandline -r "$original_cmd"
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user